-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't workingwontfixThis will not be worked onThis will not be worked on
Description
Q: I got RECEIVE_BOOT_COMPLETED
permission in this Android app.
However, when phone restarts, it does not receive it until the phone is unlocked. Why is that?
A:
The RECEIVE_BOOT_COMPLETED
permission is declared in your AndroidManifest.xml
file, and the BootCompleteReceiver
is implemented to handle the BOOT_COMPLETED
broadcast. However, modern versions of Android have security measures and restrictions that delay the delivery of certain broadcasts, like BOOT_COMPLETED
, until the device is unlocked for the first time after reboot.
To address this issue, consider the following steps:
- Ensure that the
BootCompleteReceiver
is correctly enabled and exported in the manifest. - Check for any device-specific settings or restrictions that might delay the broadcast.
- Optionally, explore using the
Direct Boot
feature to access certain functionalities before the device is unlocked.
For more details, refer to the Android documentation on Direct Boot.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingwontfixThis will not be worked onThis will not be worked on