有没有什么办法来检查Android的GPS是没有任何许可或关闭,只是状态我不需要切换。
Is there any way to check if the Android GPS is on or off without any permission, just the state I don't need to toggle it.
感谢
没有。检查GPS状态在Android上要求
No. Checking GPS Status on Android requires
android.permission.ACCESS_FINE_LOCATION
在code,检查GPS状态
The code to check the status of GPS
LocationManager manager = (LocationManager) getSystemService(Context.LOCATION_SERVICE );
boolean statusOfGPS = manager.isProviderEnabled(LocationManager.GPS_PROVIDER);