Android Question autostart at boot


Active Member
Licensed User
Longtime User
ok, there are many post relating this, but PLEASE give a shortcut for me 'cos I am confused

I wish my app autortart at boot on android, opening in foreground

I read I have to use a flag in a service module, so I created a new service module, with

#Region Service Attributes
#StartAtBoot: True
#End Region

Sub Service_Start (StartingIntent As Intent)
StartActivity(Main) 'yes, main is my activity module - I have also a code module and the starter service module
End Sub

NO, the app doesn't autostart. I miss something
Can you help me with the -easyest- way?

I only require that the app autostarts - nothing more.

thank you


Licensed User
Longtime User
What is the targetSDKLevel in the manifest?
Upvote 0


B4X founder
Staff member
Licensed User
Longtime User
1. Make sure not to use the starter service for this.
2. You can't start activities from the background (Android 10+) without the draw over apps permission.
3. It is recommended to use a receiver instead of a service, though it isn't the cause of this problem.
Upvote 0