You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code checks if GPS and network locations providers are available before enabling them.
// Register the listener with the Location Manager to receive location updates
if (locationManager!!.isProviderEnabled(LocationManager.GPS_PROVIDER) ) {
locationManager!!.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0L, 0f, locationListener)
}
if (locationManager!!.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
locationManager!!.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0L, 0f, locationListener)
}
Both GPS_PROVIDER and NETWORK_PROVIDER are false. This means the app can not obtain the phone's location.
The text was updated successfully, but these errors were encountered:
I'm testing an app on GloDroid on the Pinephone.
The following code checks if GPS and network locations providers are available before enabling them.
Both GPS_PROVIDER and NETWORK_PROVIDER are false. This means the app can not obtain the phone's location.
The text was updated successfully, but these errors were encountered: