In my activity, I call a MyDialog (custom dialog) in onCreate() and handle its DismissListener in Activity to find if its cancelled or not. If its cancelled, I finish the ac
you're performing your long operations in UI thread. Move them to the AsyncTask's doInBackground method. See the example here.