mohammad javad
Member
Hey
I want to use a service module(netconnection) that send and receive data to my remote server when it is called by callsubdelayed method. I use okhttputils2 to send my data in the service and if job.success was true then put a variable (the name is checktrue )=1.
When I click on "lbllamp" I want this service to be completed and if checktrue was 1 then do some stuff. I put part of my code here:
I checked and everything seems fine except that the callsubdelayed does not wait for service to be completed.
How is it possible to wait for service?
I want to use a service module(netconnection) that send and receive data to my remote server when it is called by callsubdelayed method. I use okhttputils2 to send my data in the service and if job.success was true then put a variable (the name is checktrue )=1.
When I click on "lbllamp" I want this service to be completed and if checktrue was 1 then do some stuff. I put part of my code here:
B4X:
Sub lbllamp_Click
CallSubDelayed(netconnection,"Service_Create")
If netconnection.checktrue=1 Then
lbl1.textcolor=colors.Yellow
End If
End Sub
I checked and everything seems fine except that the callsubdelayed does not wait for service to be completed.
How is it possible to wait for service?