Dear All;
i'am run javascipt.nt() function + view log window:
I'm waiting for the result in the function as shown in the screenshot, but it's = undefined.
What am I doing wrong?
B4X:
WebViewExtras1.AddJavascriptInterface(jsi,"BB")
...
Sub md5(str As String) As String
Dim j As JavaObject
j.InitializeContext
Dim s As String
s = j.RunMethod("getMD5",Array(str))
s=s.ToUpperCase
Log("return>>>"&s)
Return s
End Sub
Sub lg(s As String)
LogColor(s,Colors.Magenta)
End Sub
JavaScript:
function nt(){
BB.CallSub("lg",false,"before md5");
var s;
s=BB.CallSub("md5",false,"1");
mss.innerText ="и md5="+ s;
BB.CallSub("lg",false,"after md5 =" + s);
//alert("1="+s);
}
i'am run javascipt.nt() function + view log window:
I'm waiting for the result in the function as shown in the screenshot, but it's = undefined.
What am I doing wrong?