Android Question StartServiceAt ... can we use this from anywhere ?

Discussion in 'Android Questions' started by Jmu5667, Mar 6, 2015.

  1. Jmu5667

    Jmu5667 Well-Known Member Licensed User

    Hi All

    I am reworking one of our apps to be more battery friendly. Currently the GPS service running is running with a partial lock and getting the GPS postion at regular intervals, let just say every 5 mins it turns on the GPS, get a fix and turns off the GPS.

    This would be better handled by a service callback, StartServiceAt. I have read from other posts that StartServiceAt should be really only called from Service_Start, is this really true ?


  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    No. StartServiceAt can be called from anywhere.
    But for scheduling it is easier to call it from Service_Start so you can know when the next time will be.
    NJDude likes this.
  3. Jmu5667

    Jmu5667 Well-Known Member Licensed User

  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