14
How to implement blocking dialogs on Android platform
No comments · Posted by admin in Informatica
Googling on Internet I seen that it’s very difficult (for a lot of people “impossible”) to have a blocking dialog on Android platform. When I say about blocking dialog I intend a dialog that blocks the main thread execution until a user action is made.
On Android this is a very difficult task because Android supports only asynchronous Objects
A lot of people in their blogs have been writing that it wasn’t a good idea blocking main thread execution and they proposed to restructure the source code in order to put the appropriate code in the “onClick” function of the dialog’s button.
I also think this is the better solution but sometimes a programmer might need to block the main thread execution.
Here you can download my solution: BlockingDialog.tar
android · blocking · dialog · modal · synchronous