Android Question New Starter service

Humberto

Active Member
Licensed User
Longtime User
Hi
I´m using the new Starter service to inicialize all common stuff including language transalator.
At the first time I ask the the language and then I call "activity.Finish" to end the program so the next time the language comes.
But when I call the program again it doesn´t execute the "Starter" again .

Bellow is the log


After "Primeira vez solicitar lingua"

Do I must call "Starter" by code ?
 

Rick A.

Member
Licensed User
Longtime User
That's how it works. The service is started and keeps there all the time until being finished by your code ( StopService(Starter) ) or some probably very rare system event. You should notice that the service does not have a "FirstTime" parameter, it's because the Starter.Service_Start should occur just once for the entire app lifecicle. Set your Process_Globals values as necessary, and maintain your machine states as you intend after the start between its activities.
 
Last edited:
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
The object AHTranslator is declared in "Starter" but at the first time I didn´t initiaze it because I don´t know the language yet.

How can I finish the apk so the next time execute the "Starter" ?

I ended with "Activity.Finish" but it just "Pause" the apk.
 
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
Instead of initialize the things in a "Service_Create" I do it in a function, so at the first time I will ask the language to the user and then I call that function , and the next time the software starts I call it in "Service_Create" .

Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…