Android Question Msbox2Async problem

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi to all
I have some problems adapting old code, using MsgBox and CustomDialogs to the "new" situation. As "new" I mean the fact that apparently the Modal style dialogs and msgboxes are not available now (actually not only deprecated). In fact, old style apps, using those elements, have a severe drawback: the dialogs and msgboxes disappear if user touches the screen outside of them or pauses the phone. In this latter case, when the phone is reactivated, they appear for a short time and then disappear (apparently assuming OK as an result). I downloaded the example related to Dialogs using B4XViews and successfully resolved the situations related to CustomDialogs. I was able to adapt my customdialogs, which were build programmatically and not by the designer. This is why I attach the project related to new dialogs, downloaded from this site. As a matter of fact, I am not able to resolve one of the above problems with the asyncronous MsgBoxes. In the attached project, I added the last button calling a msgbox2async function. The problem of touching outside the msgbox surface is resolved: the message box doesn't disappear with external touches. But the problem that the box disappears when the phone is paused and reactivated, remains: msgbox2async disappears anyway and I don't see the way to maintain it alive after pausing the phone. Probably an answer is to make a B4xView for the MsgBox...
I attach the project which is self explanatory. Maybe the use of "Wait for" is not correct, but these are my trials. Thanks in advance for any comment.
 

Attachments

  • TestMsgBoxAsync2.zip
    10.9 KB · Views: 110

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi. Thanks for reply. Of course there could be empirical "turn-arounds" to this situation. But the question is related to the basic mechanisms. First of all: is it normal that this happens? Much probably, I didn't understand well the async mechanisms that were introduced. This is my actual problem. Thanks again.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Upvote 0
Top