when i recevie a notification Erel make notification ok.
if i click on a notification the app re-take control.
i what to put a msg box with notification.
Not sure if i understand correctly - but if you want to have the number on the icon of the homescreen, this is not included in firebase nor notification.
This is called a badge. search the forum, there is a library for this, but i'm not sure if it works correctly on all devices.
the icon is not my primary problem
my promary problem is that I don't receive the message in fm_MessageArrived so if i click on the bar the app open ... but i want to display the message inside the app
There are 2 types of messages. Data only and WITH the notification part.
If the app is in background (=screen of/other app in foreground) FCM behaves differently:
1. WITH notification
Just a notification will displayed by the FCM service (nothing else). Then the user has to click the notification and the data has to be retrieved via intent
2. DATA ONLY
This is what you need. This will be received in the background like you need (in any case, even if the screen is turned off/other app is in foreground). You have to notify on your own.
This is not correct if you are using the B4J code (or similar B4X code) to send the message.
The message will arrive exactly the same whether the program is running or not.