#BridgeLogger : true
Sub Process_Globals
Private NativeMe As JavaObject
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then NativeMe.InitializeContext
Dim stringParameter As String = "Hello World!"
Dim longParameter As Long = -123456789012345678
Dim stringReply As String = NativeMe.RunMethod ("FirstMethod", Array (stringParameter, longParameter))
Log (stringReply) 'will print "String = Hello World! Long = -123456789012345678"
End Sub
Sub SecondMethod (stringParameter As String, longParameter As Long)
Log ("String = " & stringParameter & " Long = " & longParameter) ' will print "String = *** Hello World! Long = -123456789000000000"
End Sub
#If JAVA
public String FirstMethod (String Text, long Value) {
try { _secondmethod ("*** " + Text, Value + 12345678); } catch (Exception e) { return ""; };
return "String = " + Text + " Long = " + Value;
}
#End If