Hello all,
I have created a timer application that involves delays lasting up to about 10 seconds. When I run the process that involves these delays, I always run up against a "Activity XXXX (in application XXXX) is not responding" error message. Other than reducing the delays that this process incurs (I'm afraid that they're necessary to the app's functionality), does anyone know of a way for me to avoid this error? I would very much appreciate it!
A little more on the app: When the user presses a button, the app plays a sound, waits a few seconds, plays another sound, waits 2 more seconds, plays another sound, and repeats this about 2 more times.
Here's the code I'm using the create the delays:
Thank you very much for the help!
I have created a timer application that involves delays lasting up to about 10 seconds. When I run the process that involves these delays, I always run up against a "Activity XXXX (in application XXXX) is not responding" error message. Other than reducing the delays that this process incurs (I'm afraid that they're necessary to the app's functionality), does anyone know of a way for me to avoid this error? I would very much appreciate it!
A little more on the app: When the user presses a button, the app plays a sound, waits a few seconds, plays another sound, waits 2 more seconds, plays another sound, and repeats this about 2 more times.
Here's the code I'm using the create the delays:
B4X:
Sub Sleep(ms As Long)
Dim now As Long
now=DateTime.now
Do Until (DateTime.now>now+ms)
DoEvents
Loop
End Sub
Thank you very much for the help!