Genymotion sagte immer, dass "GPS offen". (Version: 4.3). Aber GPS ist inaktiv.Android 4.3 isProviderEnabled falsches Ergebnis in Genymotion
Aber meine Telefone (nicht Emulator) Android 6 und 5 geben wahres Ergebnis zurück.
LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){
Toast.makeText(this, "GPS open", Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(this, "GPS closed", Toast.LENGTH_SHORT).show();
}
hinwollen Ich weiß GPS eingeschaltet ist oder aus. Aber isProviderEnabled gibt falsches Ergebnis zurück.Beispiel meines Problems: Genymotion GPS ist geschlossen, aber isProviderEnabled return gps ist geöffnet –