Track restarts, shuts down, power up and power down
can we get notification if user restarts, shuts down, power u开发者_StackOverflow社区p or down the device
Ajay,
The two Broadcast Actions you are most likely interested in are:
ACTION_BOOT_COMPLETED: This is broadcast once, after the system has finished booting.ACTION_SHUTDOWN: Device is shutting down. This is broadcast when the device is being shut down (completely turned off, not sleeping).
Please keep in mind to receive ACTION_BOOT_COMPLETE you must have the RECEIVE_BOOT_COMPLETED permission in your AndroidManifest.xml
加载中,请稍侯......
精彩评论