I have an Activity class inside which i have an class which extends ASynctask class where i perform parsing...everything works fine...In preexecute method of Asynctask i have set progress dialog cancellability to false through
dialog.setCancelable(false);
which works fine.. Now i want that if user presses Hardware back button then the that progressdialog along with loading of data should get canceled and goes back to previous activity... How can i do so?? plz help..