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

Support for google's Firebase Cloud Messaging #284

Closed
RobWu opened this issue Jun 24, 2016 · 16 comments
Closed

Support for google's Firebase Cloud Messaging #284

RobWu opened this issue Jun 24, 2016 · 16 comments

Comments

@RobWu
Copy link

RobWu commented Jun 24, 2016

https://firebase.google.com/docs/cloud-messaging/

Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages and notifications at no cost.

https://firebase.google.com/support/faq/#gcm-fcm

Cloud Messaging: I am an existing Google Cloud Messaging (GCM) developer. Should I move to Firebase Cloud Messaging?

FCM is the new version of GCM under the Firebase brand. It inherits GCM’s core infrastructure, with new SDKs to make Cloud Messaging development easier.

Benefits of upgrading to FCM SDK include:

Simpler client development. You no longer have to write your own registration or subscription retry logic.
An out-of-the-box notification solution. You can use Firebase Notifications, a serverless notifications solution with a web console that lets anyone send notifications to target specific audiences based on Firebase Analytics insights.

@aried3r
Copy link
Member

aried3r commented Jun 24, 2016

I think rpush already supports FCM, because it's no different to GCM from what I gathered.

You won’t need to make any server-side protocol changes for the upgrade. The service protocol has not changed. source

We could change the endpoint URLs, like node-gcm does, but even that seems to be optional for now.

Updating these endpoints is not strictly required, as Google will continue to support the existing GCM endpoints. source

I'm gonna close this, but I'll reopen it, should I have missed something. :)

@aried3r aried3r closed this as completed Jun 24, 2016
@RobWu
Copy link
Author

RobWu commented Jun 24, 2016

Thanks for your fast response.

@aried3r aried3r mentioned this issue Jul 25, 2016
@Kris-Simpson
Copy link

@aried3r do I understand correctly, now, when I use Rpush::Gcm::Notification.new notification will be sent on FCM server? Or is it only plans?

@aried3r
Copy link
Member

aried3r commented Sep 27, 2016

@Kris-Simpson, yup, it's just an URL change, but the functionality is the same.

@robban
Copy link

robban commented Sep 29, 2016

Hi, I signed up for the FCM service (GCM does not seem to be available anymore) and I am trying to use the rpush libraries. I am getting 401 (Unauthorized) errors when doing: rpush push . Tried to change the urls but that did not help.
I am guessing that I my auth_key is wrong, I am using the "current_key" from the google-services.json. Anyone have an idea on how i find the auth key for FCM?

@robban
Copy link

robban commented Sep 29, 2016

Oki, so I finaly found the auth_key. If anyone else has trouble finding it is in the firebase console-> Your project name -> Settings -> Cloud messaging -> Server name

@jogiranjith
Copy link

@robban thank you so much it worked for me \m/

@spaghetticode
Copy link

@robban thank you, I think this note should be in the readme to save other people's time

@vokrut
Copy link

vokrut commented Dec 29, 2017

For using with FCM needed two parameters: app.name = "android_app" and app.auth_key = "...". In FCM console we have Server key, Legacy server key, Sender ID, project ID, package name, App ID. Could someone help with it? What exactly we need to put in that parameters?

@aried3r
Copy link
Member

aried3r commented Jan 16, 2018

@vokrut, the server key is needed.

@ronyfhebrian
Copy link

What is registration_id in rpush FCM and how to get it?

@aried3r
Copy link
Member

aried3r commented Feb 22, 2018

@ronyfhebrian, it's the devices registration token. The link shows how to get it on Android.

@nikolai-b
Copy link

nikolai-b commented May 9, 2018

I came here because it is linked to in the readme.

@aried3r I think this might a note saying the URLs have now been updated

As of April 10, 2018, Google has deprecated GCM. The GCM server and client APIs are deprecated and will be removed as soon as April 11, 2019. Migrate GCM apps to Firebase Cloud Messaging (FCM), which inherits the reliable and scalable GCM infrastructure, plus many new features. See the migration guide to learn more. source

@aried3r
Copy link
Member

aried3r commented May 9, 2018

Yep, you are right! I read about this too. There's also structural changes to the payloads, which I want to test out at work first.

I think it might also be a good time to really replace all occurrences of GCM in the code. This might break compatibility so maybe it's going to be in 4.0.

I don't really have much time currently to work on Rpush, so I'm happy for every contribution. :)

@nikolai-b
Copy link

Once I've settled in using rpush I might be able to look at helping.
Thanks.

@alexshikov
Copy link

Just curious, is that something scheduled or the contribution wanted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants