Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Possible Duplicate:
How to check which app uses GPS on Galaxy Nexus?

I saw the location icon at the top while on the home screen of my Galaxy Nexus. There were only two running apps and I cleared both of them, but the location icon was still there. I've discovered that if I turn location off then on again, it will go away, but I'd like to find out which of my apps is using this so I can consider uninstalling it or changing a setting.

Is there a way to do this? I presume maybe an app that detects this or some system thing?

share|improve this question

marked as duplicate by Izzy, roxan, onik, GAThrawn, Flow Nov 27 '12 at 9:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Have you checked the output of adb logcat alady? –  ott-- Nov 16 '12 at 21:13
    
Are you running a custom ROM like AOKP/CyanogenMod/etc. ? There's the PDroid autopatcher hat adds control for this and other privacy relevant stuff. –  ce4 Nov 27 '12 at 1:09

1 Answer 1

up vote 0 down vote accepted

First off, by "clear", what exactly do you mean? Many manufacturers' UI overlays provide ways to remove running apps from quick-access lists, like the one you get with a long press on the home key, but doing that usually doesn't actually close the app. Android, by default, keeps apps running in "background" mode after you back out of them, because they're faster to switch to if they're already in RAM than if you start them "cold".

So, unless you're "force-closing" apps using the Settings view or a "task killer" app, any app you had been running but "cleared out" is still running in "background mode". Most apps do very little in background mode, to economize on CPU and thus battery use, but some will maintain things like GPS access. Any social app that allows you to "check in" somewhere, like Facebook, Foursquare, "footprint" apps, etc is likely to do this, so that you can quickly mark your current location without waiting for the GPS to reacquire satellites and get your location.

If you are force-closing or task-killing apps you think are using GPS, and you're still seeing the GPS icon, it could be one of two things; first, the force-close action is not a "clean" way to shut down applications, and many will not expect to be force-closed, so if you force-close an app that was using GPS it may not clean up things like its connections to phone features such as GPS.

Second, there are some services built into Android, like the E911 service, that use GPS if it's available and that cannot be shut down. So, if you start up GPS for something else, one of those services may ask the OS to keep the acquired signals from the GPS satellites so they can maintain your location just in case you have to call 911, until you manually turn off GPS altogether (at which time the services fall back to less granular location methods, like triangulating from nearby cell towers or known Wi-Fi hotspots).

EDIT: To answer the actual question asked (novel concept, I know), I can't find any apps that will show GPS usage that are available on Google Play and do not require a rooted phone (and/or custom ROM i.e. CyanogenMod etc). The one I did find, Spare Parts Plus PRO, is purported to do so in a roundabout way, by showing battery usage of installed apps with permission to use GPS, but other than one user testimonial here (over a year old) I can't find any evidence it actually does this anymore (the free version does not and none of the documentation specifically says it will), and I'm not gonna spend money to find out just to give you an answer here. Sorry. If you want to try, it's only $1.75; do let the rest of us know.

The only thing I can suggest is to look for an app manager that will list running programs based on the permissions they require. There are several that list apps by permission; aSpotCat, PermissionDog, App Permission Watcher, etc. however I'm not sure which of them will also allow filtering by current running status (PermissionDog pops up a notice when an app starts, showing what it can do).

If you find one, the usage is simple; if it's running, and it needs the GPS, it's a suspect to be the app actually using GPS right now.

Lastly, from a technical standpoint, it's the Android OS actually "using" the phone's GPS. Most apps, especially ones that don't require rooting, cannot directly control any feature of your phone; they instead ask the Android OS to get or set information regarding those features, using the "service managers" that Android exposes in its API. An app that needs your location will simply ask the Android LocationManager service for your current location, optionally requesting "coarse" or "fine" granularity, and Android will then use whatever location services you have told it that it can use (GPS, cell towers, Wi-Fi hotspot location) to find out, returning the location and the method used (or telling the app that the requested level of granularity couldn't be used because you turned it off). Android does not, AFAIK, keep tabs on which apps have made recent requests through the API for its location services (much less which of those requests required the service to spend significant resources to find out); it only knows which apps have permission to do so, and as long as at least one of them is running and has made a request, Android keeps GPS active.

The upshot is that pretty much the best you can do is cross-check running apps with apps that can use GPS, to find out which apps may be using GPS right now. If there's only one running that has the required permission, it's pretty easy to narrow it down. If there are a dozen apps or services with that permission currently "running" (RAM-resident), it's a bit harder (especially because, as I said, some of these may be basic services of the phone that can cause it to crash if you try to force close them).

share|improve this answer
1  
Good information -- but how does that answer the question: How can I find out what app is using my GPS from the background? –  Izzy Nov 16 '12 at 17:54
    
Oh yeah, I just meant I used the dedicated "running apps" key on ICS+ to close them. I realize that that leaves stuff running in the background. –  MalcolmOcean Nov 16 '12 at 17:55
    
What @Izzy said. I can think of plenty of reasons why apps might do this, but I wanted to know which ones. Also, it just started happening in the past few weeks, so I highly doubt that it's related to a built-in service. Even if it is, I'd like to know for sure. –  MalcolmOcean Nov 16 '12 at 17:56
    
Unfortunately a search through Google Play for variations on "GPS Monitor" or "GPS Usage Tracker" only showed apps that use GPS to track or monitor things (yourself, your trucks/drivers, your kids, etc) rather than tracking GPS usage itself. –  KeithS Nov 16 '12 at 18:08
    
Thanks for looking into this. It doesn't look like there's an obvious answer, but this is helpful insight. I haven't been seeing the icon there lately, so I'm not sure what's going on now. –  MalcolmOcean Nov 19 '12 at 4:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.