GPS DESACTIVADO
public static void alertaGpsDesactivado(final Context context){
final AlertDialog alertDialog = new AlertDialog.Builder(context).create();
alertDialog.setTitle(Constantes.MENSAJE);
alertDialog.setMessage(Constantes.MENSAJE_GPS_DESACTIVADO);
alertDialog.setIcon(R.drawable.info_48x48);
alertDialog.setButton("Aceptar", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
context.startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));
alertDialog.dismiss();
}
});
alertDialog.show();
}
Util.alertaGpsDesactivado(this);
public static void alertaGpsDesactivado(final Context context){
final AlertDialog alertDialog = new AlertDialog.Builder(context).create();
alertDialog.setTitle(Constantes.MENSAJE);
alertDialog.setMessage(Constantes.MENSAJE_GPS_DESACTIVADO);
alertDialog.setIcon(R.drawable.info_48x48);
alertDialog.setButton("Aceptar", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
context.startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));
alertDialog.dismiss();
}
});
alertDialog.show();
}
Util.alertaGpsDesactivado(this);
Comentarios
Publicar un comentario