There are two types of FCM
Messages:
- Display Messages - The notifications received in background and the data payload goes to System Tray for which apparently I have no way of receiving data unless User interacts with the notification itself.
- Data Messages - The data received when app is in foreground and
onMessageRecieved
service event is called. I save that in a database on my android device and is available from there at anytime.
Does this mean that if user dismisses the notification, when app is in background, I have no way of receiving the sent data? Can I still save it in a local android phone database from there or do I have to make an explicit (some other method) server call to my app server for the remaining data?
If not, does FCM
extend to this extent? Overriding handleIntent
is a method but not recommended and it is final
now so no chance there, I guess.
Also, is there a better solution other than FCM
if none of the above is applicable?