I would like to detect when the user changes the GPS settings on or off for an Android phone. Meaning when user switches GPS sattelite on/off or detection via access points
Try this,
try { locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { Log.i("About GPS", "GPS is Enabled in your devide"); } else { //showAlert }