I need to run logic reading values from a Bluetooth IOIO board every 200 msec.
In the past, I have used successfully in the sub Service_Start
with the newer android version, I am getting a reading every couple of seconds instead of msec
Is there an issue replacing the StartServiceAt with sleep(200) in the Service_Start sub and never exit the sub till the program is terminated?
for example
thanks
In the past, I have used successfully in the sub Service_Start
B4X:
StartServiceAt ( "" ,DateTime.Now+200,True)
Is there an issue replacing the StartServiceAt with sleep(200) in the Service_Start sub and never exit the sub till the program is terminated?
for example
B4X:
Sub Service_Start (StartingIntent As Intent)
Do While ShutDown=False
Connection_Maneger
Process_Reading
Sleep(200)
Loop
CancelScheduledService("")
StopService("")
Notification1.Cancel(1)
ExitApplication
End Sub
thanks