I\'ve an AsyncTask and I want it to stip execution when back button is pressed. I also want the app to return to the previous displayed Activity. It seems I\'ve managed in stop
Try this one...
progress_dialog.setCancelable(true); progress_dialog.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { // TODO Auto-generated method stub YourActivity.this.finish(); } });