Related
ArticleWhy does Android 4.0 fail to receive boot broadcasts?
Register a receiver in the configuration file androidmanifest. xml. The intent-filter sub-node is used to receive Android. Intent. Action. boot_completed messages.
CopyCodeThe Code is as follows: <Cycler Android: Name = "com. Ray. Ray. cycler. bootcompletedreceiver">
<Intent-filter>
<Action Android: Name = "android. Intent. Action. boot_completed"/>
</Intent-filter>
</Cycler>
At the same time, you need to add the corresponding PermissionsCopy codeThe Code is as follows: <uses-Permission Android: Name = "android. Permission. receive_boot_completed"/> you can add the operations required to start the instance in the worker er.
Public class bootcompletedreceiver extends broadcastreceiver {
@ Override
Public void onreceive (context, intent ){
// Todo auto-generated method stub
}