2

I'm trying to get FCM message in different situations, while the app is running in foreground or background. In one case while I FORCE STOP the application then restarting the phone, the FCM message isn't showing in notification bar. I assume that restarting means the FCM services should be run and I can fetch the messages.

In Android-manifest, I define RECEIVE_BOOT_COMPLETED for a receiver to call FCM service.

Can somebody help me here ?

KENdi
  • 7,576
  • 2
  • 16
  • 31
M.Zebeleh
  • 77
  • 8
  • Can you check whether auto start is disabled for your app in system settings if you are using xiaomior huawei phones – Sangeet Suresh Mar 29 '17 at 04:09
  • My device is samsung galaxy note3 ... – M.Zebeleh Mar 29 '17 at 04:11
  • After you Force Stop an app it will not receive any broadcast intents. See this answer: http://stackoverflow.com/a/40626941/4815718. Stopped state is [explained here](https://developer.android.com/about/versions/android-3.1.html#launchcontrols). – Bob Snyder Mar 29 '17 at 04:51
  • @BobSnyder: Tnx for your reply, I check this scenario for whatsapp ... I've force stopped it then restarting phone & after that send a message from another device & get push notif, what is the diffrences between whatsapp & my app ? why I can get notification in whats app ?!! – M.Zebeleh Mar 29 '17 at 05:17
  • I don't know. Hope someone else can answer. – Bob Snyder Mar 29 '17 at 05:24
  • I am also facing this issue , if user does force stop and RECEIVE_BOOT_COMPLETED does get called. @M.Zebeleh did you able to resolve this ? – Tasneem Apr 05 '17 at 11:45
  • What you are doing on your BootCompleteBroadcastReceiver ? which gets the BOOT_COMPLETE callback – Tasneem Apr 05 '17 at 11:49

0 Answers0