I am using asynctask in one of my fragment. but when press back before completion of asynctask the app crashes. I am calling asynctask in onstart method of fragment.
this is my onStart method of fragment where I am executing the asynctask.
public void onStart() {
// TODO Auto-generated method stub
super.onStart();
new FetchTableTask().execute();
}
what should I add in the code so that even when the asynctask is incomplete the app would not crash.