I have my main application running. I then start a new thread.
In this thread i call an asyncTask.
Will its
protected void onPostExecute(Long result) {
showDialog("Downloaded " + result + " bytes");
}
method execute on the thread or on the application calling the thread?
The docs are very specific about this point:
This is because the AsyncTask internally uses a Handler to do the communication with the Thread which called new and execute() on it. If this Thread is the UI-Thread, there is no problem. Otherwise the calling Thread has to be a Looper to be able to link UI changing operations and event handling with the UI-Thread.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments