Can some help me in getting the return value of a javascript function from within android native code. The answer to this thread helped me to get the alert value of the javascript function from android java activity class but not the return value. In the following js function, if I do
echo window.localStorage["email"]
I get an alert in my java activity class. However
return window.localStorage["email"]
does nothing and I instead I get the error cannot convert from void
to String
for my
MyActivity.activity.sendJavascript("userEmail();")
Here is my js function:
function userEmail() {
return window.localStorage["email"];
}