mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
replace GPS_PROVIDER with NETWORK_PROVIDER to retrieve the gps data from the network
This commit is contained in:
parent
78b73c0fac
commit
9ef0e6044c
@ -59,14 +59,14 @@ public class PhoneNetworkLocationProvider extends AbstractLocationProvider {
|
||||
final LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
|
||||
locationManager.removeUpdates(getLocationListener());
|
||||
locationManager.requestLocationUpdates(
|
||||
LocationManager.GPS_PROVIDER,
|
||||
LocationManager.NETWORK_PROVIDER,
|
||||
interval,
|
||||
INTERVAL_MIN_DISTANCE,
|
||||
getLocationListener(),
|
||||
Looper.getMainLooper()
|
||||
);
|
||||
|
||||
final Location lastKnownLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
||||
final Location lastKnownLocation = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
|
||||
LOG.debug("Last known network location: {}", lastKnownLocation);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user