0

This is a killer issue with no solution as of now. I submitted this to the firebase support team. It is caused by (at least) Samsung who, in order to save battery power, arbitrarily shuts off services. One of them being the firebase messaging service. The firebase team has submitted a request to Samsung to fix this issue but it has not gotten fixed.

if you poke around Samsung battery settings you will find you can list an app as a "unmonitored app" where is says that apps listed here will not be stopped. But it doesn't work.

Maybe if you were someone important you could convince Samsung to "whitelist" your app.

What is making things worse is that when the monitors of this forum see this subject discussed they usually either close the post or delete the post. It is as if they are trying to keep the issue quiet. It does indeed render FCM practically useless.

I am trying to get the truth out here. hope someone reads this before Mordac deletes this post.

EDIT 04/02/2019 Firebase support has informed me that Samsung has fixed their problem of shutting off foreground services. This fix will only apply to Android Pie but will never be retro fixed for Android Oreo. Foreground services will never be reliable on Samsung devices running Oreo. Developers can get around this problem by dealing directly with the device using Samsung SEAP API LEVEL MDM_3.0.

Dean Blakely
  • 3,535
  • 11
  • 51
  • 83
  • BTW it's not Samsung but it's firebase default to not trigger `onMessageReceived` in app when it's in background – Hanzala Jan 12 '19 at 06:10
  • Hanzala: I'm quoting what the firebase support team told me. What you say doesn't make sense. Can you point me to the docs that support what you say? – Dean Blakely Jan 12 '19 at 15:07
  • check this answer https://stackoverflow.com/a/54123463/2692102 – Hanzala Jan 14 '19 at 04:26
  • Hanzla: Sorry, I failed to mention here that I am using "data messages" which always go through onMessageReceived. Samsung is killing firebase messaging service. – Dean Blakely Jan 14 '19 at 20:43

0 Answers0