How can I discover that my device has rebooted, given that HONEYCOMB BOOT COMPLETED is no longer supported?

前端 未结 2 498
情书的邮戳
情书的邮戳 2021-01-07 13:22

I am developing app in Android 4.0.3. I\'ve read that the HONEYCOMB BOOT COMPLETED event is no longer supported, according to Google\'s documentation.

Given this, ho

2条回答
  •  攒了一身酷
    2021-01-07 13:59

    I am developing app in Android 4.0.3. I've read that the HONEYCOMB BOOT COMPLETED event is no longer supported, according to Google's documentation.

    You misinterpreted the documentation. BOOT_COMPLETED is supported. However, it does require some component of your application to be run manually, before any registered BroadcastReceiver will work. Typically, this is done by starting an activity. Hence, if you just install an app and restart the device, you will not get control at boot time.

    You can read more about this in the "Launch controls on stopped applications" of the Android 3.1 release notes, as well as in this blog post.

提交回复
热议问题