I have this code on 'actAskServer' activity
At first, I made this activity to download the updates, and as you can think
I use it on a button_click event as
StartActivity(actAskServer)
this line bring up an empty layout where the activity downloads the update and when its done, activity auto closes.
thats ok.
--
Now, imagine that I have multiple activities that user interact, and sometimes is the need to ask Server for data.
1-I would like to call the activity from whatever activity but be invisible can this made?
2-Also as I saw when the StartActivity called the only way to 'catch' it, is on the parent Activity_Resume event. for ex. if i do :
this msgbox never will be shown...
to be honest I would like a synchronous call...
for example
any way to do something like this?
B4X:
http://www.b4x.com/forum/basic4android-updates-questions/17744-use-only-socket-send-receive.html#post101709
At first, I made this activity to download the updates, and as you can think
I use it on a button_click event as
StartActivity(actAskServer)
this line bring up an empty layout where the activity downloads the update and when its done, activity auto closes.
thats ok.
--
Now, imagine that I have multiple activities that user interact, and sometimes is the need to ask Server for data.
1-I would like to call the activity from whatever activity but be invisible can this made?
2-Also as I saw when the StartActivity called the only way to 'catch' it, is on the parent Activity_Resume event. for ex. if i do :
B4X:
StartActivity(actAskServer)
msgbox("this is a test","test")
this msgbox never will be shown...
to be honest I would like a synchronous call...
for example
B4X:
Sub btnMaintain_Click
actUpdate.Server_IP = serveIP
actUpdate.Server_Port= 50959
actUpdate.Connection_Timeout = 20000
ret = actUpdate.SendCommand("GetProducts") //where SendCommand is a function on actUpdate activity.
msgbox(ret,"test")
//OR
msgbox(actAskServer.ReturnValue,"test")
End Sub
any way to do something like this?
Last edited: