Im trying to pass some base 64 string back to javascript from my webview Android App.
someBase64String is the string name
Below is working with a literal string “33333”
webView.evaluateJavascript("(function() { window.dispatchEvent( new CustomEvent("myEvent", { "detail": {"tmp": 33333 } }) ); })();", null);
I know I am escaping the characters wrong. any suggestions on how to pass ${someBase64String} correctly?
When I try to replace “33333” with ${someBase64String} ,nothing get’s received.
webView.evaluateJavascript("(function() { window.dispatchEvent( new CustomEvent("myEvent", { "detail": {"tmp": ${someBase64String} } }) ); })();", null);
New contributor
Hello is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.