-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Comments
@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. |
Awesome. The first steps are in the android client SDK. If you think this is the right direction we can get started there. |
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 |
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 It would be nice if we could choose the API level (3 or 4) from the config. What do you think? |
I was assuming that all tokens would be refreshed as GCM v4. Is there a
|
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 :) |
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. |
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. |
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.
The text was updated successfully, but these errors were encountered: