Android Question Auto start up of an android Service

Kalpesh Modha

Member
Licensed User
Hi,

I have a service which has the below set to true. If run the service as the owner of the device it runs fine etc and even if I reboot the device service startups and when I put the device to sleep it works.

The problem is that if log in as a user the service doesn't start up automatically, if run the service manually it will start up, but if I put the device to sleep it will not startup again as a user.

#Region Service Attributes
#StartAtBoot: True
#End Region

The version of Android is 6.0.1 and B4A version 6.31.

Just to add that on Android 4.2 this worked fine as admin or as a user.

Any ideas?

thanks
Kal.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The version of Android is 6.0.1 and B4A version 6.31.
Note that it will not work properly on Android 8+ with B4A v6. You need to use B4A v8+ for that (it is related to automatic foreground mode).

The problem is that if log in as a user the service doesn't start up automatically, if run the service manually it will start up
Not sure that I understand. Do you mean that you installed the app while being logged as a different user?
 
Upvote 0
Top