React-native-push-notification: Support With Firebase (FCM) Documentation

Created on 17 Nov 2016  路  14Comments  路  Source: zo0r/react-native-push-notification

Most helpful comment

I just got this working yesterday and it's all backwards compatible with GCM. Get your SenderID here: https://console.firebase.google.com/project/yourproject-123456/settings/cloudmessaging

Use the Server Key shown on that page to configure your backend (I use Amazon SNS).

All 14 comments

I just got this working yesterday and it's all backwards compatible with GCM. Get your SenderID here: https://console.firebase.google.com/project/yourproject-123456/settings/cloudmessaging

Use the Server Key shown on that page to configure your backend (I use Amazon SNS).

Can you provide a reference on how you did it in detail with code @mltucker that would be really helpful to me and to anyone in the community that is having this problem. Thankyou

Yes, please could you submit a PR with the information? There's a trouble shooting guide that might be an appropriate place for this sort of stuff.

@adeelibr Which code? The react-native side? You can just use the example in the README. Or do you mean the server-side part?

@npomfret Sure

@mltucker I meant a guide for remote based FCM push notifications, the README.md file is not detailed enough. This would mean a lot for a noob of a developer like me.

After banging my head against the wall trying to get this set up, it looks like this repo has much clearer documentation: https://github.com/evollu/react-native-fcm

As @mltucker exposed, it is backwards compatible with GCM, however some documentation would be appreciated. Also using in conjuction with APN seems to be a nightmare. I believe it is not updating automatically the registration Tokens to Firebase.

If you insist on using GCM, you can check this.

I am using react-native-push-notification with AWS SNS on the backend to push notifications. I generated API Keys and Sender Id's using that. But now it refuses to work on the AWS side. I was afraid that I needed to switch back to the react-native-fcm component but that was not necessary. I have just created a new project using firebase console and it gave me also the old-style-shorter server api key, which is fine for now.

@milkers so is it working fine with react-native-notification and AWS SNS?

Yes, this component works fine with AWS SNS. However in order to get server api key for Android, you should use firebase console instead of old google developers console.

@milkers why did you choose AWS SNS instead of firebase (and react-native-fcm )? (I saw that also firebase is multiplatform)

@mltucker We were already developing our backend using AWS and all our data was in S3. So adding another AWS tool seemed more convenient to us. If we were not touched AWS before, it would make more sense using firebase considering it is multiplatform.

@milkers another question about the configuration (android). I configured the app for the library as written here https://github.com/zo0r/react-native-push-notification#android-manual-installation. The I registered my app on firebase. Should I also configure my app as written here https://firebase.google.com/docs/android/setup#manually_add_firebase and here https://firebase.google.com/docs/cloud-messaging/android/client? Or after the registration I can start the AWS configuration? thanks :)

Was this page helpful?
0 / 5 - 0 ratings