Android Question Firebase Messaging - how to receive notifications if the app is killed but not stopped

Alexander Stolte

Expert
Licensed User
Longtime User
I all read this:

But after ~10 minutes when the app is in the background, no more notifications arrive.

If i set this to true, then at least notifications will arrive after i close the app via the manager, but after ~10 no notifications arrive.
FirebaseMessaging Service:
#StartAtBoot: True

Do I have to use this instead of "StopAutomaticForeground"? Or what else must I do?
B4X:
Service.AUTOMATIC_FOREGROUND_WHEN_NEEDED
 

Alexander Stolte

Expert
Licensed User
Longtime User
But after ~10 minutes when the app is in the background, no more notifications arrive.
i found out that if the app did not close(in the background), notifications still arrive after 10 minutes. But how do I get them to arrive when the app is closed by the manager?

My parents for example press the "Close all" button when they put the phone away, but then notifications should still arrive...
 
Upvote 0

Marvel

Active Member
Licensed User
You can try to schedule a service to check notifications at some time interval.

But ideally, I don't think there is a solution for that (I might be wrong). Even apps like WhatsApp don't display notifications when I manually close them.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
If you close the app with the Close all method of the taskmanager then your app can get the status crashed on some devices.
Android prevent receiving notifications until the app is started manually once in this case.

TIP: Tell your parents not to use CLOSE ALL
 
Upvote 0

Marvel

Active Member
Licensed User
Besides FB ... notifications always pop up.
Really?
I usually just manually close an app when I don't want to get any notifications from it and it works all the time.
I don't use FB though, and I also think it may vary from device to device.
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
TIP: Tell your parents not to use CLOSE ALL
I have already 2000 times and every time they ask me why they do not get any notifications...

While there are cases, mainly depending on the specific device, that messages will not arrive, the steps you did will not help.
ok, then Android users have to live with it
 
Upvote 0
Solution
Top