Android Question MsgBox2 not showing up

nobbi59

Active Member
Licensed User
Longtime User
Hello Community,

I got a proble with MsgBox2. I'm using it 2 times in my Main Activity. The second one works, but not the first one.

This is my code for the first one:

B4X:
Dim res As Int
             res = Msgbox2("Wir freuen uns, dass du - nutzt. Wenn dir die App gefällt, bewerte sie doch auf Google Play.", "Bewerten","Jetzt bewerten","Nein, danke","",Null)
             
             If res= DialogResponse.POSITIVE Then
                Dim i As Intent
                i.Initialize(i.ACTION_VIEW, "market://store/apps/details?id=...")
                StartActivity(i)
             End If

The second code is the same. So this first Msgbox is shown in the Activity_Create Sub. The other one is shown when a user clicks on a button.

So maybe someone can help me.

Best regards
 

DonManfred

Expert
Licensed User
Longtime User
while running activity_create you can not show a modal dialog. Move the call to activity resume or use callsubextended and call a sub 400ms later. Show the messagedialog in this sub then.
 
Upvote 0
Top