Created
November 30, 2018 09:38
-
-
Save MahbbRah/6b9732ffb9c6cbbf2d1f026629b1e2bb to your computer and use it in GitHub Desktop.
Setup Push Notification with React Native (Instructions/Guide)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Setup of React native push notification is very easy things. But documentations and all that isn't right the way it should be. | |
| So in this short snippet I'm going to explain, How you can achieve this without any issues! | |
| #This guid is for only Android Developers for now | |
| #First step | |
| > we will use this library for push notification: https://github.com/zo0r/react-native-push-notification Install this library on with your project | |
| > and then do a link it as mentioned. But Only linking is not enough at all! | |
| #2nd Step is | |
| > You need add Permissions/metas with your `AndroidManifest.xml` file manually for that follow the app docuemntation. (This is will automatically won't apply) | |
| > Then what you need is for `FCM` Follow this issue: https://github.com/zo0r/react-native-push-notification/issues/852 You'll have to apply this plugin | |
| #3rd Step | |
| > Now you will need to create a Firebase Cloud Messaging (FCM) project then take the `Sender id` and put it on first configuration | |
| #4Th Step | |
| > This step is to register your react-native app on FCM and get the `google-services.json` file and put it on android/ folder. | |
| #5Th step | |
| > This is only app side.. If you want to do the server side to send push notification then you can simply follow this: https://gist.github.com/rolinger/d6500d65128db95f004041c2b636753a | |
| > THough above is only PHP Implementation. | |
| > If you want to simply just check if these configuration is working for you or not then you can use a third party http request sender something like `postman` | |
| check this imgur screenshot for postman https://imgur.com/a/1jLjokl | |
| > on the post body. there is a parameter called `to` This one is the device token you will get if you successfully setup the fcm library with device. | |
| Hopefully this helps you :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment