React-native-push-notification: onNotification does not get triggered when the client receives notification from server.

Created on 13 Apr 2018  路  3Comments  路  Source: zo0r/react-native-push-notification

Hi,
onNotification event does not get triggered in android when the app receives the initial notification. It does only when you tap on the notification. I wanted to capture the message sent by the server in onNotification event and display localNotification in onNotification event.

Thanks

Stale

Most helpful comment

Hi,
I did configure it outside of RN's life cycle but still 'onNotification' method is not getting fired. @iamrutvik could you point out which versions of the libraries are you using? That might help. THanks!

All 3 comments

React Native Push Notifications clearly states that we need to call configure outside of the React Native Lifecycle. This is very important.

https://product.farewell.io/visible-react-native-push-notifications-that-work-on-both-ios-and-android-5e90badb4a0f

https://prnt.sc/k61hz7

Hi,
I did configure it outside of RN's life cycle but still 'onNotification' method is not getting fired. @iamrutvik could you point out which versions of the libraries are you using? That might help. THanks!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings