0
Genymotion總是說「GPS open」。(版本:4.3)。但GPS無效。Android 4.3 isProviderEnabled Genymotion錯誤結果
但我的手機(不是模擬器)android 6和5返回true結果。
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();
}
我想知道GPS是或關閉。但isProviderEnabled是返回錯誤的結果。我的問題的示例:Genymotion GPS關閉,但isProviderEnabled返回GPS打開 –