2
I use this code to check if the GPS is enabled to display a dialog:
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
boolean GPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
but only works until version 19 if I am not mistaken, I would like to implement to work on all versions of android, but I could not, someone give me this help ai, vlw!