I\'d like to ask for some help: In my app, I have only one activity, a PreferenceActivity
(don\'t need other, it\'s just a simple background-sync app, so the
For me this solved the problem.. checking if the dialog is null or not showing and if yes then create again.
// create alert dialog
if (enableNetworkDialog == null || !enableNetworkDialog.isShowing())
enableNetworkDialog = alertDialogBuilder.create();
if (context instanceof AppCompatActivity && !((AppCompatActivity) context).isFinishing())
enableNetworkDialog.show();