In android, we can easily check whether GPS is enabled in device or not using LocationManager.
Here is a simple program to Check.
GPS Enabled or Not :-
Add the below user permission line in AndroidManifest.xml to Access Location
1 | < uses-permission android:name = "android.permission.ACCESS_FINE_LOCATION" /> |
Your java class file sgould be