How does ACCESS_FINE_LOCATION keep GPS off?

I want to get the exact location from NETWORK_PROVIDER so that the GPS shuts off to save battery. This seems impossible because the android, when ACCESS_FINE_LOCATION specified, turns on the GPS, even if the location is not requested by GPS_PROVIDER.

I added:

 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 

in the manifest. I needed this to avoid the android messing up the exact position.

I registered updates only with NETWORK_PROVIDER , not GPS_PROVIDER :

 myLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 60000, 0, locationListener); 

GPS turns on anyway. How can I avoid this (without forcing the user to turn off the GPS, which does work, but is undesirable)?

+4
source share
3 answers

It sounds strange if you did not request location updates from a GPS provider, it should not download GPS.

Let me give you some advice - don't rely on your network provider to give you “accurate” accuracy if you don’t sit on Wi-Fi, which Google knows about the location.

Positioning based on cell towers usually has an accuracy of about 500-2000 m, possibly 3-500 m in the city centers.

+2
source

Use ACCESS_FINE_LOCATION that you want to use GPS or ACCESS_COARSE_LOCATION if you do not want to use GPS.

0
source

If your positioning technology is turned off to save energy, how can you expect to get an accurate position? It would be like the machine will make you work, but does not want to insert gas into it. TANSTAAFL.

As mentioned above, Wi-Fi positioning can give you pretty good localization if you are close to several APNs that Google knows about. Given enough time and enough people using their phones, Google will eventually recognize every APN that’s not moving.

0
source

All Articles