Hi all... i have a sub in activity that execute in sequence sub locate in starter service like this:
While processing, the screen goes to sleep (Activity_Pause) and the getDataC_Done is ignored, so what I'm asking for is:
1. While running getDataC sub, there is an error and Success = False, how to wake-up the screen and show the error message
2. If the getDataD is completely finish, how to wake up the screen and show a finish message box to the user
i read @forum (can't remember the link) that i should check at activity_resume sub, but i don't know how to manage.
thank you, any help would be appreciated
B4X:
'Activity
Sub getDataFromServer()
CallSubDelayed(Starter,"getDataA")
wait for getDataA_Done (Success As Boolean, Error As String)
If Success = False Then
ToastMessageShow(Error,True)
Return
End If
CallSubDelayed(Starter,"getDataB")
wait for getDataB_Done (Success As Boolean, Error As String)
If Success = False Then
ToastMessageShow(Error,True)
Return
End If
CallSubDelayed(Starter,"getDataC")
wait for getDataC_Done (Success As Boolean, Error As String)
If Success = False Then
ToastMessageShow(Error,True)
Return
End If
CallSubDelayed(Starter,"getDataD")
wait for getDataD_Done (Success As Boolean, Error As String)
If Success = False Then
ToastMessageShow(Error,True)
Return
End If
End Sub
'Service
Sub getDataC()
...
...
CallSubDelayed3(mCallBack, "getDataC_Done", Result, ErrDesc)
End Sub
While processing, the screen goes to sleep (Activity_Pause) and the getDataC_Done is ignored, so what I'm asking for is:
1. While running getDataC sub, there is an error and Success = False, how to wake-up the screen and show the error message
2. If the getDataD is completely finish, how to wake up the screen and show a finish message box to the user
i read @forum (can't remember the link) that i should check at activity_resume sub, but i don't know how to manage.
thank you, any help would be appreciated