Skip to content

Upgrading GCM to v4 #1369

Closed
Closed
@inlined

Description

@inlined

Aside: This request may only have implications on the Android SDK; I'm bringing it up here because it's mostly focused around helping people with the Parse Server migration.

Hey everyone. When the Parse sunsetting announcement came out, I wanted to help my old customers out. I’ve chatted offline with a few push providers like Batch and OneSignal to help with their migration process. I also chatted with the the GCM team to see if there was anything Google could do to help Parse customers. It looks like the best answer is “upgrade”.

When we (@bnham and I) did the GCM integration for Parse Push, GCM was on v3. V4 has a lot of new features; the most important for Parse customers is topics. Parse customers can register a ParseInstallation’s channels as a topic and keep their targeting info for push-to-channel no matter which GCM push provider they use[1]. Push to topic is also much faster than Parse Push’s normal engine--a “mega” push, if you will.

To enable topics, Parse’s Android SDK will need to start requesting tokens using the v4 Instance ID APIs. The only catch I can think of is that v4 changed the way sender IDs worked. V3 returned one token that worked with multiple sender IDs; the v4 APIs will return one token per sender ID. Since ParseInstallation.deviceToken is a scalar, the Parse SDK would need to request a token for the Parse sender ID or the developer-provided ID.

Hope this helps. If you decided to upgrade to v4, I can get the Intent lifecycle from the GCM team. This will help you upgrade while still avoiding the compile-time dependency on the GMS SDK.

[1] If it interests you, GCM v4 also introduced support for APNs. You could get the same benefits for Apple devices if you added the GCM SDK, though I understand if you want to stay with the native API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions