BTW, you can use the regular and in most cases better Sleep method.
Sub AppStart (Args() As String)
sys.InitializeStatic("java.lang.System")
Start
StartMessageLoop
End Sub
Sub Start
Dim user_input As String
Log("Press <q> to exit..")
Do Until user_input.ToLowerCase = "q"
user_input = Input("> ")
If user_input.EqualsIgnoreCase("hack") Then
Log("root@kali$ Hacking your B4X forum password. Please wait...")
Sleep(2000)
Log("root@kali$ Processing... (10%)")
Sleep(1000)
Log("root@kali$ Processing... (20%)")
Sleep(2000)
Log("root@kali$ Processing... (50%)")
Sleep(500)
Log("root@kali$ Processing... (80%)")
Sleep(500)
Log("root@kali$ Processing... (90%)")
Sleep(500)
Log("root@kali$ Completed. Your password is (just kidding)")
Sleep(1000)
Else
Log($"You entered '${user_input}'"$)
End If
Loop
Log("Goodbye")
Sleep(500)
End Sub
This will allow a real app to do many more things while waiting.
Post about resumable subs in non-ui apps:
https://www.b4x.com/android/forum/threads/resumablesub-in-non-ui-app.106663/#post-667569