FCM Notification is not received when my app foreground service is killed, to be more clear I'm trying to keep my app always running in the background and I used the foreground services to achieve this, sometimes the app not killed by the ANDROID system and the foreground notification appears for more than 15 hours, But other times it killed after 1 hour or less or 2hours and less when my foreground notification is killed and I send FCM notification it didn't receive by my device!! what is the problem here! how can I solve it!
Asked
Active
Viewed 1,983 times
0
-
https://stackoverflow.com/questions/37711082/how-to-handle-notification-when-app-in-background-in-firebase – Usama Altaf Jan 12 '21 at 10:16
-
@UsamaAltaf hello, I saw this it didn't help since I can handle the notification the idea is I can't do that when My foreground service is off! is there a relation between these two approaches? I mean between the FG service and FCM notifications? – Reham Alraee Jan 12 '21 at 10:41
1 Answers
0
You might just need to change the notification priority. If the information to be displayed is critical, you may want to consider bumping the Priority Setting to High priority. I also suggest checking the lifetime of a message in the FCM docs which provides more details on the possible causes of delayed or undelivered messages.

Omatt
- 8,564
- 2
- 42
- 144