Broadcastreceiver Not Working While Phone Is Booting In Android
Solution 1:
Check this out.. I also had the same problem Broadcast not invoking:
According to my knowledge the problem is with Android HoneyComb and ICS. I have tested same application on HoneyComb,ICS, Ginger Bread and Froyo. Worked perfectly for Froyo and Ginger bread but not for honeycomb or ics.
Solution 2:
if you are just shutting down your phone and switching it on, then you might not get this broadcast. try to restart your phone. this would work.
you havent added any code in your question, so it woulld be really difficult to guess what you are missing and what probably is going wrong.
Solution 3:
Well the way to receive system startup is as followsRegister receiver in manifest:
<receiverandroid:name=".StartupReceiver"><intent-filter><actionandroid:name="android.intent.action.BOOT_COMPLETED" /><categoryandroid:name="android.intent.category.HOME" /></intent-filter></receiver>
Use the permission in manifest<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Write the class below in your package
publicclassStartupReceiverextendsBroadcastReceiver {
publicvoidonReceive(Context context, Intent intent) {
Log.e("MyStrtupIntentReceiver" ,"################# onReceive() system boot");
}
}
Post a Comment for "Broadcastreceiver Not Working While Phone Is Booting In Android"