Android program boot from Boot

Source: Internet
Author: User

Today encountered the program boot from start, and then checked, very simple, on record.

Starting from the start, generally we start a broadcast, and then start the activity or other services on the radio.

What we're going to do is simply to add a line of code to the broadcast inside the androidmanifest.xml.

<receiver android:name= "broadcast name "> <intent-filter> <action android:name= " Android.intent.action.BOOT_COMPLETED "/> </intent-filter></receiver>

Of course we also need to add permissions:

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

So it's over.

It is important to note that:

1, installed in the SD card application is not receiving boot_completed broadcast.

2, the system turned on the fast boot mode, this mode of system boot does not send boot_completed broadcast.

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.