Android Question Get push message notification when app is not running

paiac66

Member
Licensed User
Hi,
I want to read the message notification (created by me with firebase service) into my app so that when I click on notification (on the notification bar) It will starts my app and read the message.
The service is right when my app is running, but when it isn't, by clicking on the notification, the app starts and not read the message.
Do you have any suggestions?

Thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

paiac66

Member
Licensed User
The code not work for me. I use my service (in .NET) for sending fcm message, with payload key (as "data", "link", etc). The service "FirebaseMessaging" fires the notification message if my app is running in foreground, but when it is in background or stopped, when I click on the notification the app start but the message is not fired.
 
Upvote 0

paiac66

Member
Licensed User
Hi, problem solved! I wasn't understand the difference from notification message and data message, the last one is fired when the app is in background, the message notification is fired with the sub "messageArrived" of service when the app is in foreground.
Thanls at all!
 
Upvote 0
Top