Android Question New Starter service

Discussion in 'Android Questions' started by Humberto, Aug 26, 2015.

  1. Humberto

    Humberto Active Member Licensed User

    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 ?
  2. Rick A.

    Rick A. Member Licensed 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: Aug 27, 2015
  3. Erel

    Erel Administrator Staff Member Licensed User

    The process was not killed so the starter service doesn't need to be created and started again.

    Where is the AHTranslator object declared?
  4. Humberto

    Humberto Active Member Licensed 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.
  5. Humberto

    Humberto Active Member Licensed 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" .

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice