Android Question Autostart vs Userstart

LuanKotze

Member
Licensed User
Longtime User
Hi all,

I would like to know whether the Starter service was started by #StartAtBoot or via the user clicking the app icon. I assume it can somehow be done with "StartingIntent As Intent", perharps something in the StartingIntent.getData tells you if it was auto-started.

I have an option in my app that can disable autostart, and in this case I would like the Starter service not to start my activity or other services.
 

LuanKotze

Member
Licensed User
Longtime User
Thanks as always for the prompt reply Erel. So just to get my ducks in a row, I create a new service lets say "MyAutoStarter" with StartAtBoot. The devices boots and we have:


--------------Click here for image-----> <----------Click here for image------------
 

Attachments

  • Call_Structure.png
    Call_Structure.png
    85.6 KB · Views: 415
Upvote 0

LuanKotze

Member
Licensed User
Longtime User
Currently I have #AutoStart on my starter service, and then call StartActivity(Main) from Starter. Reading the other threads I realize this is wrong and I completely missed the point of the Starter service. As I now understand it, whenever you call StartActivity(Main) or any other Activity, Starter will be run first?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

LuanKotze

Member
Licensed User
Longtime User
Thanks guys. I changed accordingly, this solved a random bug I was getting with terminating my app. In addition I now understand the use of starter.
 
Upvote 0
Top