views:

46

answers:

1

Hi, Firstoff, I'm a complete newbie to Android platform development. What basically, I want to know right now is, whether there is any similar APIs available in Android SDK, which will allow events to take place, even if the main thread is blocked for some extensive operation? Something which is similar to ProcessEvents() or DoEvents() in some other platforms.

Thanks a lot in advance.

A: 

No, sorry. The approach in Android is to not block the main application thread.

CommonsWare
So does that mean that, in a multithreaded application, if the main thread is displaying some modal window( may be some popup or something) or performing some UI intensive operation, will it not block the main thread?..so in that case, is it possible to allow other thread events to process?
Code.Warrior
@Code.Warrior: If Android is executing your code on the main application thread, it will not be processing events. So long as your code on the main application thread is very quick, or you make careful use of `AsyncTask` or background threads, everything will work fine. "Modal" is a statement of user experience -- it has nothing to do with threading. http://developer.android.com/guide/practices/design/responsiveness.html
CommonsWare