Android Question When i reboot my phone,the service is not run


Licensed User
Longtime User
I create a service , and define it's auto run ,like:
#Region Service Attributes
#StartAtBoot: true
#End Region

but it's no effect.
The service is run ok when the app started or activity.finish.


B4X founder
Staff member
Licensed User
Longtime User
Note that the app has to run at least once for that to take effect, that's a security feature to prevent malicious apps to run silently in the background.
It is even more strict. If the user has explicitly killed your app (with the built-in task manager) then your app will not start until it is started by the user.
Upvote 0