calcazar / react-native-push-notification-CE

The community edition of the push notification library (by Zo0r) for applications made with React Native
MIT License
52 stars 23 forks source link

onNotification from killed app inconsistency Android #27

Closed clfristoe closed 4 years ago

clfristoe commented 5 years ago

When I'm opening the Android version of my app upon receiving a notification when the app is killed, I'm experiencing some inconsistency. onNotification is being triggered, and I can see the deeplink being printed out to the console, but the following code inside the handler is not being called unless I'm stepping through with a debugger. It seems as if only the first line in the onNotification handler is being called.

My onNotification handler: onNotification: (notification => { console.log('push sent: ' + notification.deeplink) //shows up consistently alert('Push sent '+notification.deeplink) //only shows when stepping through debugger if(notification.deeplink) { showMessages({...passProps, url: notification.deeplink}) } }),

ammarRajabA commented 4 years ago

Hi @clfristoe , did you manage to solve this?

clfristoe commented 4 years ago

I ended up going a different route with this.