I create an AsyncTask instance and run it from my user interface thread (in onCreate () the handler of my activity). I guarantee that the activity does not restart due to configuration changes (it ignores a change in orientation, for example).
In my Activity.onCreate (): I use asynctask.execute (), then the thread user interface does some work, and then asynctask.get (...) is called to synchronize until Activity.onCreate () is completed.
According to the log, my asynctask.onPostExecute () gets the age after returning asynctask.get (). More precisely, onPostExecute is called after the return of Activity.onResume (!). (So ββit is called, my method definition is fine, I also use @Override.)
I read it somewhere that since onPostExecute () places in the UI thread handler, the UI thread should be ready for this - why isn't it ready in this case? My application starts with a change in orientation, but it does not cause a configuration change due to my settings in the manifest.
Is there any guarantee when onPostExecute () will be called relative to asynctask.get ()?
source
share