FusedLocationProvider finds location faster with GPS turned of

130 views Asked by At

My android app relies on location. However the FusedLocationProvider which I use for this as abstraction layer so that I do not have to worry about what LocationProvider to use, behaves unexpectedly.

Scenario: User opens app. I check for the availability of the providers and open the location settings page. The user enables "Access to my location" and both GPS and Wi-Fi location. When the user returns to the app I receive no location updates.

When I leave GPS turned off and only allow Wi-Fi in the System settings, I get an updated location.

I tried the priorities PRIORITY_LOW_POWER and PRIORITY_BALANCED_POWER_ACCURACY which both did not give me a location update when GPS was turned off.

How does it come, that the detection of the location works with GPS turned off and doesn't when it is turned on? Does that make any sense?

The location I obtain, when GPS is turned off is accurate enough for what the app is doing. If the device has had LocationServices turned on for a longer periods of time (Including the phone being outside) I receive Location Updates even with GPS turned on.

Does someone have an explanation for this / know how to solve this?

0

There are 0 answers