Android Question modal vs non-modal

MohMor

Member
what is the difference between modal and non-modal message? for example, what is the difference between Msgbox and MsgboxAsync.
thnk you very much.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Modal dialogs should never be used.
With the introduction of resumable subs there are much better options.

Modal dialogs (B4A Msgbox or DoEvents for example) hold the main thread until the dialog is closed. It is done by processing the message queue internally. In the old days of Android, the system was simple enough and it mostly worked fine. As Android evolved it became very problematic and is likely to cause your app to crash in some cases.

Even if it ran perfectly, the fact that the message queue is processed in an unexpected point has all kinds of bad side effects.
 
Upvote 0
Top