I’ve read similar threads on here, even googled but no solution.
onProgressUpdate() is just not being called.
Here’s the code:
public class DoHardWork extends AsyncTask {
@Override
protected Object doInBackground(Object... params) {
publishProgress("Requesting XML data");
this.requestData();
publishProgress("Returning results");
this.returnResults();
return null;
}
protected void onProgressUpdate(String text) {
super.onProgressUpdate(text);
MainActivity.setLog(text);
}
}
I tried setting a breakpoint in onProgressUpdate() and it’s never called. It’s like the code is just ignored.
Someone had a similar problem and it turned out to be just eclipse just messing with him but i tried restarting it with no success.
Any ideas?
I think that you missed somethings on your code. Try with this one: