Android Question How i can implement this in my app with (wait for)?

Alhootti

Active Member
there is msgbox contain checkbox with button (OK) is appeared in my app i wanna after i tick the box and click on button some thing happen like msg or whatever.
i need to use wait for
my main goal is the command after (wait for) does not execute till i tick the checkbox and click the button.
B4X:
If manager.GetDevices.Length = 0 Then
        ToastMessageShow(" No Device ", True)
    Else
        Dim device As UsbDevice = manager.GetDevices(0) 'assuming that there is exactly one
        If manager.HasPermission(device) = False Then
            ToastMessageShow("Please allow connection and click again.", True)
            manager.RequestPermission(device)
            wait for   '<----- here
            'msgbox
            Else If manager.HasPermission(device) = True Then
'                usbserial.Initialize("serial", device, -1)
                usbserial.Initialize2("serial", device, -1, "CDCSerialDevice")
                usbserial.BaudRate = 115200
                usbserial.DataBits = usbserial.DATA_BITS_8
                usbserial.StartReading
                ToastMessageShow("Done  ", True)
            End If
            End If
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…