Disable fcm default notification on "background or quit" device state #4622
-
Hi! How to disable fcm default notification when the device state is on "background or quit"? Currently i'm using notifee library as foreground notification handler, but also i want to use the library to handle notification when the device state is on "background or quit". My code right now: When my device state is on "background or quit", i received duplicate notifications, 1 from fcm & 1 from notifee library. How to disable the fcm default notification & use notifee notification library instead? Thankyou. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
If you don't want the default notification to show from FCM, then you should be sending data-only fcm messages. In other words, your fcm message shouldn't have a |
Beta Was this translation helpful? Give feedback.
-
Yes, I got the solution.
Fetched the notification from webpush object in payload. It worked in my
case.
[image: image.png]
…On Sun, Jul 21, 2024 at 9:21 PM Jacks717 ***@***.***> wrote:
Did you got solutions ? iam also facing same problem
—
Reply to this email directly, view it on GitHub
<#4622 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIYWWDVFUPXS5OP54AYZYPDZNPKHXAVCNFSM4UECNTW2U5DIOJSWCZC7NNSXTOSENFZWG5LTONUW63SDN5WW2ZLOOQ5TCMBRGA3TIMJV>
.
You are receiving this because you commented.Message ID:
<invertase/react-native-firebase/repo-discussions/4622/comments/10107415@
github.com>
|
Beta Was this translation helpful? Give feedback.
If you don't want the default notification to show from FCM, then you should be sending data-only fcm messages.
In other words, your fcm message shouldn't have a
notification
field.