Android 4.0.3 cannot receive broadcasts when booting

Source: Internet
Author: User


==================== Problem Description ====================
On Android 4.0.3 phones, receiver does not receive the start-up broadcast after the phone is powered on, the code is as follows:

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

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


Java files:
public void OnReceive (context context, Intent Intent) {
TODO auto-generated method stubs
LOG.V ("Test", "Phone start complete");
}

This in the configuration in the Android 4.0.3 phone, how can not receive the boot broadcast, in other versions of the phone normal reception, online search:
There are several reasons for that:
(1), boot_completed corresponding action and uses-permission not added together
(2), the application installed in the SD card, installed in the SD card application is not receiving boot_completed broadcast
(3), the system turned on the fast boot mode, this mode of system boot does not send boot_completed broadcast
(4), the application has not been started after installation, in this case, the application does not receive any broadcasts, including boot_completed, action_package_added, connectivity_action and so on.
After Android3.1, the system in order to enhance the security control, the application after installation or (set) in the application management is forced to shut down in the stopped state, in this state is not receiving any broadcasts. It will not be out of this state until it has been started (user open or other application call), so after Android3.1
(1), the application cannot be started after installation
(2), a program without a UI must be activated by another app to start, such as its activity, Service, Content provider are called by other applications.

I have ruled out the above reasons, and I have installed two other software on this machine, both of which can boot up the service, that is to say, the two software can receive the launch broadcast!!
Heroes: On your knees, high-score bong!
==================== Solution 1====================
Tell me what I think.
1.<category android:name= "Android.intent.category.HOME"/> Add this sentence to the receive on the manifest file
2. Place your program under/system/app/
3. Start the application first once the installation is complete

Before also encountered this situation, the Internet said this is 3.0 after the limit, only the system level of application can receive the power-on broadcast, so can only put the program under the/system/app, and then all OK
==================== Solution 2====================
Manifest file does not have permission permission?
Landlord look at my blog, I have a record here:
http://blog.csdn.net/whu_zhangmin/article/details/18654031
==================== Solution 3====================
There are system permissions to receive the broadcast from the boot no no No
==================== Solution 4====================
Follow the study ~ ~ ~
==================== Solution 5====================
Reference 5 Floor bj_yj2005 's reply:
android4.0.3, the public defender installed in the SD card, so boot, crash ...
Also, ask u010457784: How to install the app under/system/app/?
Ask still green tea: How to get system permissions?

App installed in the/system/app method:
1, or you are the handset manufacturer, then the ENG version direct ADB push into the/system/app directory.
2, three-party applications, the need for root mobile phone, you can install a Baidu one-click Root or 360root,root, the APK copy to SD
ADB shell
Su
CP-FR Source APK Address/system/app

Get System permissions:
The manufacturers will not say
The phone Root said above
Otherwise, unless there's a signature on the phone system,


==================== Solution 6====================
Landlord problem solved? Boot from Boot
==================== Solution 7====================
Reference 9 Floor bj_yj2005 's reply:
still green tea: no solution! Public trust and WiFi master key The two software on my phone with 360 mobile phone assistant installed, run once, you can boot from the start, according to your method above, I believe in my mobile phone can be done, but ordinary users so difficult to make, the above two software is how to realize the power-on self-start? And the credibility of the defender installed on the SD card can also boot from the start!!

You have to stop these two programs in the Setup application, and then restart the phone, the two brother must not boot from the boot.
==================== Solution 8====================
I also have this problem, with the study

Android 4.0.3 cannot receive broadcasts when booting

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.