Inform the user when the location provider is disabled.
This commit is contained in:
parent
7242f1c2f1
commit
db3f60b4b1
|
@ -83,6 +83,10 @@ class LocationTracker @Inject constructor(
|
||||||
callback?.onLocationUpdate(location.toLocationData())
|
callback?.onLocationUpdate(location.toLocationData())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onProviderDisabled(provider: String) {
|
||||||
|
callback?.onLocationProviderIsNotAvailable()
|
||||||
|
}
|
||||||
|
|
||||||
private fun Location.toLocationData(): LocationData {
|
private fun Location.toLocationData(): LocationData {
|
||||||
return LocationData(latitude, longitude, accuracy.toDouble())
|
return LocationData(latitude, longitude, accuracy.toDouble())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue