How to display notification in foreground #4325
-
@mikehardy i am using react-native-firebase/app -8.4.0 firebase.notifications().displayNotification(localNotif).catch(err => console.error(err))** |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm curious how do you show your notification banner in banner and kill state since you are not using any 3rd party lib. Well for Foreground, I'm having the following code at my
|
Beta Was this translation helpful? Give feedback.
-
You will need to integrate a 3rd party notification library. I would embrace it vs rejecting it. Proper on-device notification handling is an important set of features for an app and should be treated as such. Notifications can be displayed easily on device with the built in handling of notification payloads in all but foreground state @TommyLeong as @saurabh874 mentions. But the underlying SDKs don't handle notification payloads if the app is foreground. That's what a real notification package is for. |
Beta Was this translation helpful? Give feedback.
You will need to integrate a 3rd party notification library. I would embrace it vs rejecting it. Proper on-device notification handling is an important set of features for an app and should be treated as such.
Notifications can be displayed easily on device with the built in handling of notification payloads in all but foreground state @TommyLeong as @saurabh874 mentions. But the underlying SDKs don't handle notification payloads if the app is foreground. That's what a real notification package is for.