Android Question Firebase FCM fm_MessageArrived when app not showing


Well-Known Member
Licensed User
Longtime User

I have followed the tutorial on the FCM, and trying to work out if the fm_MessageArrived sub should run when the app is not showing on the screen ?

For testing I have made my B4A app count down from 20 to 0. When it gets to 0 it will send a push notification. The same app will then receive that push notification and reset a counter back to 20, and continue over and over until I tell it to stop.

Everything works well while the app is open and showing on the screen.

When the app is not showing on the screen (running in the background), it seems to create a notification in the notifications section on the phone, but it never runs the fm_MessageArrived sub, therefore it never re-sends the push notification when the counter gets to 0.

Should it be running the sub fm_MessageArrived when the app is not showing, or does it only run that sub when the app is open? I am wanting it to run that sub when the FCM arrives when the app is not showing on the screen (running in the background).


Licensed User
Longtime User
The Google FCM service should wake up your service. Check if your app is allowed to run in the background (energy saving option) first and retry. Send data messages only (growse the forum or see the Google docs for fcm)
Upvote 1