-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
onMessageRecieved not working when app is killed. #365
Comments
Hi @DanikKamilov could you include a few things that would help?
|
Hello.
a) { b) { it works fine for Foreground and Background but not for Closed app |
Looks like you are using the REST API to send data messages. This means that the notification that you are creating and any data included in it is up to you. FCM is not managing including data in those notifications. Only when you send notification-messages does the FCM SDK play a role in displaying notifications. I would look at the code you are using to generate the notifications. |
`
` and yes... problem in Android version. iOS - works fine. |
@DanikKamilov the issue would be in the code that you are using to generate the notification on the Android device. Your server code seems fine which is why you are not having issues on iOS. have a look in your I'm closing this issue now since the issue is not related to Firebase. If you think it is please file a new issue with details. |
Hello!! |
It would be difficult to make suggestions here without seeing the code used to generate the notification after the data message is received. We are constantly working with device makers to have a consistent experience, if you are getting unexpected behavior for messages on particular devices please let us know make, model and OS version and we will try to address it. |
`
}
` and I've tried to use different flags in intent and pending intent and it not works... (I can't catch intent.putExtra("notification",messageBody); in MainActivity when app is closed.) |
And one more question. I can't subscribe iOS app to topic. Where in code I need to subscribe ? In AppDelegate? |
I have an issue with setContentTitle. Im working with flavors in android. I'm comfortably receiving notifications when app is in foreground/background/killed. But the problem is when app is in background/killed the title i'm receiving is incorrect i.e the title i'm getting from server what they've set. If the app is in foreground the title works fine. |
In Meizu M1 Note data-only push comes if app is foreground/background? but if app is killed onMessageRecieved is not call. |
error W/GCM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=net.korul.hbbft (has extras) } |
onMessageRecieved not working when app is killed. It works perfect in foreground and in background and I can receive Extras in MainActivity. But when app is killed I receive notification and after click on it- Extras == null.
I send only DATA (to, data) notification. What I do wrong?
The text was updated successfully, but these errors were encountered: