App shown using Location Services when not loaded!

Discussion in 'iOS 5 and earlier' started by jtara, Nov 13, 2011.

  1. jtara, Nov 13, 2011
    Last edited: Nov 13, 2011

    jtara macrumors 65816

    Joined:
    Mar 23, 2009
    #1
    Hey, maybe this is a clue to the battery drain issue.

    I had considerable battery drain over night. I noticed that the location indicator in the status bar was on. This seemed strange: no app should be using location services all night (I don't KNOW it was on all night, only assume...) unless you left, say, a navigation app running.

    So, I went through the list of apps under location services in Settings, and noticed a purple indicator next to Loopt.

    Thing is, Loopt wasn't loaded!

    I double-tapped the home button to bring up the task list. Verified that Loopt was NOT loaded, and closed all other open apps. The indicator in the status bar and the indicator next to Loopt were still on.

    Turned off location services for Loopt. That turned the purple arrow next to Loopt to grey, and turned the indicator in the status bar off. Turn location services for Loopt back on. Both indicators came back on.

    Out of curiosity, opened Loopt. Blank screen. Wait, wait, wait. Never opened.

    Manually killed Loopt. I THINK this is when the location indicators turned off. (Status bar turned off, once next to Loopt went from purple to grey.) I was going to reboot, but wasn't necessary as something I did turned off location services.

    Re-started Loopt. This time I got the Loopt startup screen. Location indicator in the status bar. Closed Loopt. Location indicator goes away, as I would normally expect.

    I'm an iOS developer, and I use Location Services in my apps. So, I know a little about how they work. I know that iOS runs an instance of Location Services "on bahalf of" all apps that use it. This is much more efficient than having each app perform the same functions independently. Apps "register" to receive update messages from Location Services, and let Location Services know the accuracy and update frequency they require. Location Services is then able to optimize it's resource usage. It's constrained, of course, by the most demanding app loaded.

    Apps should "de-register" when they close, and certainly Location Services should have some mechanism to know if an app it is serving was terminated abnormally. (So that they never executed the code to de-register.) But perhaps something is wrong with that mechanism?

    I checked device logs, and there was NO crash log for Loopt.

    Anyone else notice similar behavior with Loopt or other applications that use Location Services?

    I am using iOS 5.0.1.
     
  2. MahatmaManic macrumors newbie

    Joined:
    Nov 14, 2011
    #2
    Some (not all) versions of Loopt make use of background location. When you register for background location updates your app will be woken up even if it's not currently running for one of the events it registered for.

    The versions of Loopt that make use of background location have settings inside the app that allow you to turn it off if you want to.
     

Share This Page