Skip to content

BOOT_COMPLETED Intent is not received at “Restart” or “Reboot” #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ameshkov opened this issue Nov 16, 2015 · 9 comments
Closed
Assignees
Labels
Milestone

Comments

@ameshkov
Copy link
Member

http://4pda.ru/forum/index.php?s=&showtopic=601691&view=findpost&p=44457292

We've missed to add one more intent:

<action android:name="android.intent.action.QUICKBOOT_POWERON" />

More details:
http://stackoverflow.com/questions/24882861/android-intent-action-boot-completed-intent-is-not-received-at-restart-or-reb

@ameshkov ameshkov added the Bug label Nov 16, 2015
@ameshkov ameshkov self-assigned this Nov 16, 2015
@ameshkov ameshkov added this to the 2.1 patch 2 milestone Nov 16, 2015
@ameshkov
Copy link
Member Author

ameshkov commented Dec 8, 2015

Done

@ameshkov ameshkov closed this as completed Dec 8, 2015
@ameshkov
Copy link
Member Author

ameshkov commented Dec 9, 2015

Does not work on MIUI

@ameshkov ameshkov reopened this Dec 9, 2015
@ameshkov
Copy link
Member Author

ameshkov commented Dec 9, 2015

According to that:
http://stackoverflow.com/questions/30124108/boot-receiver-doesnt-work

MIUI uses another action:

<action android:name="android.intent.action.REBOOT"/>

@ameshkov
Copy link
Member Author

ameshkov commented Dec 9, 2015

Nope, again, that's wrong.

Quote from stackoverflow:

MIUI has a a built-in Security app. In the Security app there is a 'Startup' section, where the user can configure which app can and which app can't run on startup. Your application is disabled default.

@ameshkov ameshkov closed this as completed Dec 9, 2015
@ameshkov
Copy link
Member Author

ameshkov commented Dec 9, 2015

@ameshkov ameshkov reopened this Dec 9, 2015
@Joss
Copy link

Joss commented Dec 9, 2015

Full log from HTC One M8 Android 6.0 in ZTS-620-56182 ticket.

@ameshkov
Copy link
Member Author

ameshkov commented Dec 9, 2015

@ameshkov
Copy link
Member Author

ameshkov commented Dec 9, 2015

Working solution (finally):

        <receiver android:enabled="true" android:name=".receivers.BootUpReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
                <action android:name="android.intent.action.QUICKBOOT_POWERON"/>
                <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
            </intent-filter>
        </receiver>

It has started working after I have removed android:permission attribute.

@ameshkov ameshkov closed this as completed Dec 9, 2015
@rahulsamaddar
Copy link

Device: OnePlus 5T
I have added the permission
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
Manifest Entry:-

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

MyBootReceiver class

public class BootReceiver extends BroadcastReceiver {


    @Override
    public void onReceive(Context context, Intent intent) {
        Log.d("boot_boot","Received BOOT COMPLETED");
        if (UserUtil.isUserRegistered(context)) {
            ChatService.startService(context);
            MetaDataUpdaterBroadcast.scheduleAlarmManager_ForUpdatingMetadata(context);
        }
    }
}

Still No luck:
Logcat data:-
01-23 16:29:43.811 3466-5236/? E/NetworkScheduler.TED: Couldn't start service: Intent { act=com.google.android.gms.gcm.ACTION_TASK_READY cmp=net.one97.paytm/com.firebase.jobdispatcher.GooglePlayReceiver (has extras) }
01-23 16:29:43.812 3466-5312/? E/NetworkScheduler: Unknown result code received: 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants