Android Question How to start my apk at boot?

ronovar

Active Member
Licensed User
Longtime User
I have writen apk that works fine...i would like to start apk when andoid os boot up.

I have done this in Starter service

B4X:
#Region  Service Attributes 
    #StartAtBoot: True
    #ExcludeFromLibrary: True
#End Region

But after android is power off and power on apk does not start at boot.
 

Descartex

Well-Known Member
Licensed User
Longtime User
Are you sure?
Some apps takes some time to start on system booting.
Once happened to me, it last even 5 minutes to start my service from system ask for PIN (this is the event I consider as the system boot ending).
 
Upvote 0

ronovar

Active Member
Licensed User
Longtime User
Apk does not start...do i need to put any code to Manifest Editor or any code somewhere in module?

I just change from False to True in above code and apk does not start..i have waiting 5minutes and apk does not start.
 
Upvote 0

ronovar

Active Member
Licensed User
Longtime User
Can You explain more Ereo avout to use a different service (i don't know how to use it only to enable from False to True in starter module).
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
(i don't know how to use it only to enable from False to True in starter module
you dont know how to enable in starter. so in result you KNOW how to enable it in any other service.

What is the question then?
 
Upvote 0

ronovar

Active Member
Licensed User
Longtime User
Ok question is:

How can i enable in B4A that my apk will start at boot.

If you could please write steps.

Thanks.
 
Upvote 0

Descartex

Well-Known Member
Licensed User
Longtime User
Create another service, not Starter, and set it to StartAtBoot, and be sure you run on release mode, as @Erel said.
 
Upvote 0

ronovar

Active Member
Licensed User
Longtime User
Ok..i will start another service and how can i set ti to startatboot? Could you please post some code?
 
Upvote 0

Similar Threads

Top