I'm using firebase cloud messaging. I have implemented FirebaseMessagingService
. And everything seems to be working well. However, I have a question, is it possible, if my application is not running, that the method onMessageReceived
will not be called and the notification data will be received in the Intent
of my launch activity ?
I tried to test, and when my application is in the background or not running at all, in any case, the onMessageReceived
is called.
However, I have seen code examples where push notification data is received in the launch activity inside onCreate via Intent, how can they get there if the onMessageReceived
is not called?
Please, help me.
Note:
I know that it is possible to start my activity inside the onMessageReceived
using the pending intent, and pass information there with a push notification, but I'm talking about cases where the onMessageReceived
may not be called. Perhaps the firebase SDK has its own mechanisms by which it can transfer information from the notification to the Intent of launch activity?