onMessage not fired when app inactive/killed.
See original GitHub issueHello,
Platform Android.
I want to catch info from notification but onNotification passed in .configure(object) is fired only when application is in foreground. Also tried
PushNotification.popInitialNotification((notification) => console.log('InitialNotication:', notification));
but in this case I get ‘undefined’.
Also if someone knows something about how to show banner on main screen.
"react": "16.13.1", "react-native": "0.63.2", "react-native-push-notification": "^5.1.1",
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Firebase onMessageReceived not called when app in ...
This is working as intended, notification messages are delivered to your onMessageReceived callback only when your app is in the foreground.
Read more >Receive messages in an Apple app - Firebase - Google
// If you are receiving a notification message while your app is in the background, // this callback will not be fired till...
Read more >Cloud Messaging | React Native Firebase
When the application is in a background or quit state, the onMessage handler will not be called when receiving messages. Instead, you need...
Read more >Firebase onMessageReceived not called when app in ...
I'm able to see notification on the system tray when my app is in background but not triggering onMessageReceived call back when app...
Read more >Handling Firebase Notification Messages in Your Web App
onMessage (function(payload) { console.log("Message received. ", payload); // ... }); onBackgroundMessageHandler is called when your app is ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You will probably find the solution issues, this is probably related to a splashscreen which intercept the notification.
Ok so when you use react-native-splash-screen it brakes chain and do not pass notification data into main activity on android. So the solution is here https://github.com/crazycodeboy/react-native-splash-screen/issues/289#issuecomment-421537284. Closing issue.