My BroadcastReceiver is not receiving the BOOT_COMPLETED intent after my N1 boots

前端 未结 2 417
迷失自我
迷失自我 2020-12-10 17:06

I am unable to get my BroadcastReceiver onReceive method called using the BOOT_COMPLETED intent.

AndroidManifest.xml



        
2条回答
  •  情歌与酒
    2020-12-10 17:28

    All the applications that receive the BOOT_COMPLETED broadcast must be installed on the internal storage because Android delivers ACTION_BOOT_COMPLETED broadcast before the external storage is mounted to the device.

    To ensure that your application will be installed on the internal memory you just need NOT to declare the android:installLocation manifest attribute.

    Another option is to set the following in the manifest section: android:installLocation="internalOnly"

    You can find more information about it here.

提交回复
热议问题