Android broadcast receiver, autostart app on boot

How to make the application waiting for android boot broadcast receiver and autostart itself?
I turn on device and I want the application to autostart. I heard of broadcast receiver class in java, but how to add this to ue4 activity or manifest?
I’m trying to add permission

to the manifest and receiver

to the application section

I’m trying to make this on Daydream Lenovo Mirage Solo (but this has Android so it should work)
If I try run command in adb like this to test an application run:
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED
I got security exception and I’m not allowed to use this.

Security exception: Permission Denial: not allowed to send broadcast android.intent.action.BOOT_COMPLETED from pid=3501, uid=2000

java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.BOOT_COMPLETED from pid=3501, uid=2000
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19185)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:19823)
at com.android.server.am.ActivityManagerShellCommand.runSendBroadcast(ActivityManagerShellCommand.java:614)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:154)
at android.os.ShellCommand.exec(ShellCommand.java:96)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:15009)
at android.os.Binder.shellCommand(Binder.java:573)
at android.os.Binder.onTransact(Binder.java:473)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:4256)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2940)
at android.os.Binder.execTransact(Binder.java:674)

How can I disable that security on Mirage Solo?

I am als trying to acheive this. I want my application to start on boot, I’ve tried packaging this in within my src android folder:

I’m not sure if this will work, but I also cant add this to the manifest as it gets overwirtten when I package, I can add in permissions etc within UE5 editor ‘project settings’, but there is no section for ‘Extra Tags for ’ or something along those lines

package com.example.UE5_Project;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * You should start your derived downloader class when this receiver gets the message 
 * from the alarm service using the provided service helper function within the
 * DownloaderClientMarshaller. This class must be then registered in your AndroidManifest.xml
 * file with a section like this:
 *         <receiver android:name=".AlarmReceiver"/>
 */
public class BroadcastReceiverOnBootComplete extends BroadcastReceiver {
 
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equalsIgnoreCase(Intent.ACTION_BOOT_COMPLETED)) {
            Intent serviceIntent = new Intent(context, UE5_Project.package);
            context.startService(serviceIntent);
        }
    }
}