Android Question Accessing InLine data from Basic

PhilipBrown

Active Member
Licensed User
Longtime User
I've written an inline java callback routine which creates some data which I want to access within Basic code. I don't know how to send this data back to Basic. Because it's a callback, I cannot just return the data.

Perhaps I have to store the data in a class and then query the class from Basic?
Or is there an easier way?
 

DonManfred

Expert
Licensed User
Longtime User
Raise an event from within the inline java when the callback is raised
 
Upvote 0

PhilipBrown

Active Member
Licensed User
Longtime User
Raise an event from within the inline java when the callback is raised

Thanks very much for this suggestion. It seems like the right solution, but I'm getting an error. My code is

B4X:
Sub showManufacturerData (text As String)
    Log("showManufacturerData got " & text)
End Sub

#If JAVA

if (processBA.subExists("showmanufacturerdata")) {
 processBA.raiseEvent("abc", "showmanufacturerdata");
}
#End IF

The error is

B4X:
java.lang.Exception: Sub showmanufacturerdata signature does not match expected signature.

I get this error no matter what type of data I try to pass, although I try to adjust the Sub parameter type to match.

I've searched this forum for this error and found lots of examples, but nothing which fits.
 
Upvote 0
Top