Skip to content

Commit

Permalink
fix: check location is enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo <[email protected]>
  • Loading branch information
Balcan authored and xavimolloy committed Jun 25, 2024
1 parent b00b285 commit 189e8ab
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ class LocationProviderImpl(val context: Context) : LocationProvider {
}

override fun hasLocationEnabled(): Boolean {
return locationManager.isProviderEnabled(locationProvider)
return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) ||
locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)
}

override fun stopLocationUpdates() {
Expand Down

0 comments on commit 189e8ab

Please sign in to comment.