Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading GCM to v4 #1369

Closed
inlined opened this issue Apr 5, 2016 · 8 comments
Closed

Upgrading GCM to v4 #1369

inlined opened this issue Apr 5, 2016 · 8 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@inlined
Copy link

inlined commented Apr 5, 2016

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.

@flovilmart
Copy link
Contributor

@inlined thanks for the heads up! We moved the push implementation to https://github.com/parse-modules/parse-server-push-adapter, I'll give you full access to the repo so you can get going with the implementation.

@inlined
Copy link
Author

inlined commented Apr 5, 2016

Awesome. The first steps are in the android client SDK. If you think this is the right direction we can get started there.

@flovilmart
Copy link
Contributor

I'm all for it, we'd need to revamp a bit the PushController to let the adapter handle the channels in that case, but that's a minor tweak

@flovilmart
Copy link
Contributor

On that note, the current parse-server-push-adapter don't support sending to iOS device using GCM, even if GCM supports it. We could imagine:

parse-server-gcm-push that provide push for all supported platforms by GCM
and rely on this adapter on parse-server-push-adapter to send to android.

It would be nice if we could choose the API level (3 or 4) from the config.

What do you think?

@inlined
Copy link
Author

inlined commented Apr 7, 2016

I was assuming that all tokens would be refreshed as GCM v4. Is there a
benefit to staying on 3? GCM is implemented in Google mobile services, not
the core OS, so there shouldn't be any device restrictions imposed by the
version bump.
On Apr 5, 2016 6:49 PM, "Florent Vilmart" notifications@github.com wrote:

On that note, the current parse-server-push-adapter don't support sending
to iOS device using GCM, even if GCM supports it. We could imagine:

parse-server-gcm-push that provide push for all supported platforms by GCM
and rely on this adapter on parse-server-push-adapter to send to android.

It would be nice if we could choose the API level (3 or 4) from the
config.

What do you think?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1369 (comment)

@flovilmart
Copy link
Contributor

for the time client transitions from v3 tokens to v4? I'm not familiar with GCM at all, so those questions may be completely dumb :)

@inlined
Copy link
Author

inlined commented Apr 26, 2016

Sorry for the delay; my day job cropped up. The same RESTful endpoints will accept v3 and v4 tokens, so there doesn't seem to be a need for any client-side configuration.

@stale
Copy link

stale bot commented Sep 18, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

3 participants