BootCompletedReceiver not working on android 11

397 Views Asked by At

I try to do this for my application to launch automatically when device is rebooted.But this is not working on android 11 devices.

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

      <receiver
            android:name=".boot.StartUpBootReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
1

There are 1 best solutions below

0
Gabe Sechan On BEST ANSWER

You can't launch an Activity from the background on Android 11. The Receiver is working fine most likely. It's the launching that is no longer allowed by the OS.

If you want to make a kiosk mode app, the correct way to do this is to make this app the launcher app so it takes over the home screen.