While overriding methods like onPostExecute
from AsyncTask
we can avoid or remove super.onPostExecute(result);
from it. Can you tell me why and when do we need to use this call?
as I here implemented AsyncTask as a inner class in my Main Activity
private class CustomAsyncTask extends AsyncTask<String, Void, Event> {
@Override
protected Event doInBackground(String... strings) {
Event result = Utils.fetchEarthquakeData(strings[0]);
return result;
}
@Override
protected void onPostExecute(Event result) {
super.onPostExecute(result);// what is the effect of calling this? If it was possible to skip or remove it.
updateUi(result);
}
}