React-native-push-notification: onRegister is never called on Android device

Created on 27 Mar 2018  路  7Comments  路  Source: zo0r/react-native-push-notification

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.

Most helpful comment

+1.
Please show your permission. As am not able to generate the token for Android. iOS works fine.

All 7 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

uendar picture uendar  路  3Comments

halaharr picture halaharr  路  3Comments

Benzer1406 picture Benzer1406  路  3Comments

anativ picture anativ  路  3Comments

sungjinoh picture sungjinoh  路  3Comments