I want to return the document to my main class but even using a global variable dosen\'t work it\'s because the asynctask didn\'t finish the job I think is there a solution to g
You could just call an other function, for example:
protected void onPostExecute(Document doc) { documentIsReady(doc); } } public void documentIsReady(Document doc) { //Do somehting }