can I emulate FCM.getBadgeNumber in Android? Or get an event when the notification is received?
See original GitHub issueHi have a question for you @evollu I’m almost done with a react native app, using your plugin react-native-fcm and I really need a way to hook me when the user receive a push notification.
So if this is method is not available in Android:
FCM.setBadgeNumber(1);
FCM.getBadgeNumber().then(number => number)
can I hook my code somewhere over here?
this.notificationListener = FCM.on(FCMEvent.Notification, async (notif) => {
// here ?
});
react-native-fcm: 6.1.0
react-native: 0.41.2
I’m running the app in Ganymotion with android 6.0.0 and a real device: Sony X performance with Android 7.1.0
The message is actually delivered. From FireBase and locally.
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (17 by maintainers)
Top Results From Across the Web
Receive messages in an Android app - Firebase - Google
If you want foregrounded apps to receive notification messages or data messages, you'll need to write code to handle the onMessageReceived callback.
Read more >How to track received notification in iOS and Android using ...
I wanted to track the event, how many notification were received on iOS and Android. Is there any way to get this number...
Read more >react-native-fcm - npm
React Native bridge for firebase cloud messaging (FCM). ... NOTE: local notification does NOT have any dependency on FCM library but you ...
Read more >Firebase Push notifications in React Native Apps - Enappd
We'll send notification using Firebase console and receive them in the app. ... can get reallllly long, I'll limit the discussion to Android...
Read more >Handling notifications in the mobile app - 4Js
The same code base can be used to handle push notifications for Android™ (using FCM) and iOS (using APNs) devices. Only the content...
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
no you can’t. when iOS app is killed by user you can’t launch background processing. You will need to send badge count though notification
yeah this is what I suggested at the first place