How can I solve the problem that an app cannot receive an android boot broadcast?

Source: Internet
Author: User

Today I found a file written in android2.2ProgramBoot broadcast (action_boot_completed) cannot be accepted when running on android4.0 ).

Later it was found that no

 
<Uses-PermissionAndroid: Name= "Android. Permission. receive_boot_completed"/>

.

Before Android 3.1, the auto-start management was not very strict, as long as your broadcastreceiver's intentfilter declares

 
<ActionAndroid: Name= "Android. Intent. Action. boot_completed" /> 

Then you can receive the boot broadcast. However, Android regulates the Automatic startup of the Program (Click here for the official documentation ).

If we do not specify use-permission, we will not be able to receive the boot broadcast.

If you have encountered this problem, check if you forgot to add permission. ^_^

Note:If you cannot receive the boot eventSystem LogThere will be a permission denied exception.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.