The problem with the AlertDialog is that when I use dismiss () the AlertDialog does not appear. If I do not use dismiss () the AlertDialog appears, but then how do I disappear it if I have setCancelable in false. I call dismiss in this way:
AlertDialog alertDialog;
alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setTitle("Sinchronize....");
alertDialog.setCancelable(false);
alertDialog.setMessage("Wait");
alertDialog.show();
To eliminate it use
if (alertDialog.isShowing()) { alertDialog.dismiss(); }