Inform the user when the location provider is disabled.

This commit is contained in:
Benoit Marty 2022-01-27 16:23:39 +01:00
parent 7242f1c2f1
commit db3f60b4b1

View file

@ -83,6 +83,10 @@ class LocationTracker @Inject constructor(
callback?.onLocationUpdate(location.toLocationData())
}
override fun onProviderDisabled(provider: String) {
callback?.onLocationProviderIsNotAvailable()
}
private fun Location.toLocationData(): LocationData {
return LocationData(latitude, longitude, accuracy.toDouble())
}