Android Tutorial Service Modules

Discussion in 'Tutorials & Examples' started by Erel, Jan 27, 2011.

  1. StefanoAccorsi

    StefanoAccorsi Member Licensed User

    Thank you for this tutorial.
     
  2. Simon Smith

    Simon Smith Active Member Licensed User

    Can anyone confirm my belief that the GPS events do not get triggered when the screen is off, yet the service is running?
     
  3. LucaMs

    LucaMs Expert Licensed User

    No.

    I have never used GPS but:
    1) I do not think there can be reasons for which events should not be triggered;
    2) on site you can find examples, like I did (this is the first I found)
     
  4. jefflynn1974

    jefflynn1974 Member Licensed User

    Afaik they should be triggered. Some years ago I wrote a simple GPS logger app which recorded the NMEA sentences to a log file and as I remember it was working in sleep, with screen off using a service.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    You should use a foreground service together with partial lock (PhoneWakeState). Otherwise the process will be killed while it is in the background.
     
    MarcoRome likes this.
  6. Simon Smith

    Simon Smith Active Member Licensed User

    Agree with Erel - this confirms my findings in latest Android 5.
     
Loading...
  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