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
final LocationManager manager = (LocationManager) getSystemService( Context.LOCATION_SERVICE ); | |
if ( !manager.isProviderEnabled( LocationManager.GPS_PROVIDER ) ) { | |
buildAlertMessageNoGps(); | |
} | |
private void buildAlertMessageNoGps() { | |
final AlertDialog.Builder builder = new AlertDialog.Builder(this); | |
builder.setMessage("Your GPS seems to be disabled, do you want to enable it?") | |
.setCancelable(false) |