How to open the application automatically after boot? (Android 10) #10414
Unanswered
oguzhan51511
asked this question in
Q&A
Replies: 2 comments 9 replies
-
Did you find the solution? |
Beta Was this translation helpful? Give feedback.
7 replies
-
Can you provide a demo program? Thank you! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am able to display toast message in BootReceiver. I cannot start the application. I managed to autostart on a device with android api 25, but the target device is Android api 29. Any ideas on this?
How can I start the application automatically when Android boot complate?
BootReceiver.cs
using Android.App;
using Android.Content;
using Android.Widget;
namespace MaRadio.Platforms.Android
{
[BroadcastReceiver(Label = "BootReceiver", DirectBootAware = true, Enabled = true, Exported = true)]
[IntentFilter(new[] { Intent.ActionBootCompleted }, Priority = (int)IntentFilterPriority.HighPriority)]
}
AndroidManifest.xml
android.permission.RECEIVE_BOOT_COMPLETED
android.permission.SYSTEM_ALERT_WINDOW
android.permission.ACCESS_NETWORK_STATE
android.permission.INTERNET
Beta Was this translation helpful? Give feedback.
All reactions