19.10.2011 1:33, b0b пишет:
It works as long as there is no onPreExecute() or if it doesn't matter if onPreExecute() is not executed in the main thread, as onPreExecute() is called in the *calling* thread.

It seems that it should work as long as the AsyncTask class itself is loaded and initialized by the VM on the UI thread - which includes its statics, of course.


But here we deviate dangerously from the official documented usage of AsyncTask for sure.

Yes, that was my point.

There are other mechanisms for communicating between a worker thread in a service and an activity on the UI thread, and they don't seem that much more complicated to me to risk a possible incompatibility.

-- Kostya

I think this changes from API functions that are not documented all all and for which you must guess what they do.

--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to