0

I am trying to launch a simple BroadcastReceiver by the BOOT_COMPLETED intent for Android 8.0, and using the Nexus 5X as emulator, no other service or class inside the project. I tried many solutions from Google but none of them work.

In summary, my problem is:

1) When I open the App A, the BroadcastReceiver of App A cannot receive the intent, but the BroadcastReceiver of App B can receive the BOOT_COMPLETED intent, .

2) When I open the App B, App A can receive the intent, but App B cannot.

Can somebody tell me what's happening? Thank you a lot.

lancer
  • 1
  • 1

1 Answers1

0

For this BOOT_COMPLETE is not the solution as per documentation https://developer.android.com/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED.

I guess https://stackoverflow.com/a/7574735/9821453 is you are looking for.

Anurag Chutani
  • 591
  • 1
  • 4
  • 15
  • Hi, I just want to launch the BroadcastReceiver after booting, but your second link is related to launch the application? thanks – lancer Sep 23 '18 at 10:03