Created
March 1, 2017 09:51
-
-
Save skymxc/2b16658f1a15a6f3888c076cd8c910d8 to your computer and use it in GitHub Desktop.
是否开启GPS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 是否开启GPS | |
| * @return | |
| */ | |
| public static boolean gpsEnable(){ | |
| LocationManager locationManager = (LocationManager) ApplicationUtil.application.getSystemService(Context.LOCATION_SERVICE); | |
| boolean enable = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); | |
| return enable; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment