-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onBackgroundMessage not fired and app not opening on notification click #104
Comments
Hello @pilz97 , |
Facing the same issue in Android as well as iOS. |
Same issue :( |
@chemerisuk Excellent plugin, thank you for all the work. I am facing the same issue on Android. Works on iOS. Also, the payload sent by my server does not include notification so I am not receiving a notification at all when the app is terminated. |
Hello, |
Same issue. «cordova.plugins.firebase.messaging.onBackgroundMessage» not Work on Android. |
Getting rid of click_action does solve the issue if you don't have a custom data payload, or if the data payload is just title and body. When I send just title and body, or custom data elements which are empty in a notification payload and the app is in the background. If i click the notification, it opens up the app hitting the .onBackgroundMessage function. example payload: However when I send some custom data In my case a url link such as www.example.com, If I click the notification it does not open up the app, and it does not hit the .onBackgroundMessage function. example payload: If the app is in the foreground any and all payloads hit the .onMessage |
I am facing the same issue. Does anyone have any solution for a workaround ? |
Hi, just curious if this issue is already fixed, especially with function onBackgroundMessage not fired? |
Hi, I can't find the notes section of onBackgroundMessage anymore, is removing the click_action the solution for this? |
The problem is that in FirebaseMessagingPlugin.sendNotification() there is a check "if (instance != null)" that simply ignores push notifications if the app is not initialized, INSTEAD OF INITIALIZE IT. @chemerisuk can this plugin perform this initialization in order to enable push notification when the app is closed? |
Hi,
I have two problems.
The onBackgroundMessage Event is not triggered, i only receive the onMessage when the App is in foreground while i receive a message.
At first I also didn't get the onMessage but then i added this to my config.xml:
<config-file target="AndroidManifest.xml" parent="/manifest/application" > <service android:name="by.chemerisuk.cordova.firebase.FirebaseMessagingPluginService"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT"/> </intent-filter> </service> </config-file>
Is there anything I have to add that i get the onBackgroundMessage to?
The second problem I have is, when i recevie a notification in the background, the push notification appears but when i click on it the app won't come in the foreground :(
Does anyone have a idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered: