It works without problems on iOs, but the onRegister method is never called on an Android device.
I use react-native 0.54.2 and react-native-push-notification 3.0.2 on a Samsung Galaxy S7 Edge with Android 7.0.
PushNotification.configure is called from componentDidMount in App.js, which is my main component. I have included my FCM sender ID in the configuration.
I had some permissions missing in AndroidManifest.xml. It works fine now!
What permissions were you missing? I copied the androidmanifest.xml and it is not working for me.
@matjemeisje can you show us your AndroidManifest.xml setup according to permissions please?
+1.
Please show your permission. As am not able to generate the token for Android. iOS works fine.
Same here - what permissions do we need to add to AndroidManifest?
@matjemeisje what permissions?
To me the problems was I wasn't setting the senderID property in configure. Seen here: https://github.com/zo0r/react-native-push-notification/issues/480#issuecomment-371578281
Most helpful comment
+1.
Please show your permission. As am not able to generate the token for Android. iOS works fine.