I would like to execute some code and wait for it to complete, but I can't use Wait For sub because my application is not monolithic, so I'm trying the Timer, that is when the application ends, I start a timer for some time hoping that this may be intercepted.
Unfortunately this does not work: is it a conceptual error or simply a syntax error?
Thanks
Unfortunately this does not work: is it a conceptual error or simply a syntax error?
B4X:
Sub fgw(activ As Activity,params As String,handleSub As String)
resumable = True
fg_timer.Initialize("fg_timer",100)
fg(activ,params,"",handleSub)
Wait for fg_timer_Tick
fg_timer.Enabled = False
End Sub
...
If resumable Then
fg_timer.Enabled = True
Return
End If