Sending data from service to a Main Activity Sub

aaronk

Well-Known Member
Licensed User
Longtime User
Hello,

Just wondering if there is a way to send data from a service module to a Main Activity Sub?

Lets say I have a sub like this:

B4X:
Sub LoadData(data As String)
msgbox(data,"My Data")
end sub

and I want to send data to that sub from a service, how can it be done?

I have tried using the following from my service but had no luck..

B4X:
Dim data as string
data = "123456"

Main.LoadData(data)
 
Top