I am using zo0r react-native-push-notification library.
"react": "16.0.0-alpha.12",
"react-native": "^0.45.1",
"react-native-push-notification": "^3.0.0"
This code runs every time I open an app:
PushNotification.configure({
onNotification: function(notification) {
console.log('onNotification');
ToastAndroid.show('onNotification', 3000);
}
});
I send local push notification from background service:
PushNotification.localNotification({
message: 'Hello World',
smallIcon: 'ic_launcher'
});
The notification gets delivered. When I click it, onNotification
method doesn't get called, then when I receive another notification, it actually gets called. It seems like it works only if app is in memory atm.
Am I doing something wrong?
I have opened a GitHub issue as well.