2016-06-22 10 views
0

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(); 
     } 

Antwort

1

Sie können die GPS-Position eines Genymotion-Emulators dank des GPS-Widgets auf der rechten Seite des Bildschirms auswählen.

Genymotion schließt die GPS-Position nicht an die Position Ihres Computers an.

Pro Tipp: GPS, Bluetooth-Funktion ist mit Emulator nicht gut funktioniert, überprüfen Sie nur mit echten GERÄT, wenn reale Gerät dann gutes Ergebnis gibt, sind Sie gut

+0

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 –