My app only needs very rough location data, so I originally set my manifest permissions to ACCESS_COARSE_LOCATION, and set up a location listener for NETWORK_PROVIDER. This gave me exactly the kind of rough location estimate I needed, but only with Google Location Services turned on.
I was expecting that if the user only had GPS enabled, that I would still receive a rough estimate of their location. But it seems like the only way to get ANY location information from the GPS_PROVIDER is by using the ACCESS_FINE_LOCATION permission.
So, is it true that with only GPS enabled, an app cannot receive location information unless it has the ACCESS_FINE_LOCATION permission? In other words, the GPS_PROVIDER can’t send rough location estimates if the app only has ACCESS_COARSE_LOCATION permission?
Generally speaking, yes.
Quoting the documentation for
LocationManager:Quoting the Android 4.2 release notes:
However, I am assuming that this does not supersede the “will not have access to the GPS” statement from
LocationManager. I assume that this means thatNETWORK_PROVIDERdata might be inhibited, if it is deemed too accurate.