Created
April 2, 2020 21:39
-
-
Save pkavoo/9388acb6fcaea8bacc7211dc692a832c to your computer and use it in GitHub Desktop.
Method for checking if GPS is enabled
This file contains 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
public boolean isGPSEnabled(Context mContext) { | |
LocationManager locationManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); | |
return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment