Trying to start a service on boot on Android

后端 未结 16 1470
慢半拍i
慢半拍i 2020-11-21 06:41

I\'ve been trying to start a service when a device boots up on android, but I cannot get it to work. I\'ve looked at a number of links online but none of the code works. Am

16条回答
  •  说谎
    说谎 (楼主)
    2020-11-21 07:13

    As an additional info: BOOT_COMPLETE is sent to applications before external storage is mounted. So if application is installed to external storage it won't receive BOOT_COMPLETE broadcast message.

    More details here in section Broadcast Receivers listening for "boot completed"

提交回复
热议问题