Android Question Socket communication problem


Licensed User
Longtime User

I'm using socket to communicate with my visualbasic program its much like discussed ini this thread:

I use multiple activities, and cant figure out how to use the socket communication on a global scale.
I have setup and a working connection on my main activity. But I realy need to send/resieve data from an other activity.

I like to have a global "sendata" sub. That I can call from any activity.
And I prevere to have a custom #event: That gets triggerd when data arrives on that activity.

PLease advice


Licensed User
Longtime User
Found it

Maybe some use to others

I needed to create a service module. And start that module using its module name from an activity

Sub Activity_Create(FirstTime As Boolean)
...... more code
End Sub

Second thing I like to pointout is that the 'service module' Service_Create routine gets started after the tread (in the activity) is finished .

Sub Activity_Resume
... a bit more code

'// service module starts when this is finished
end sub
Upvote 0