gokhangokce gokhangokce - 1 year ago 667
Android Question

Crosswalk call js function from java on android

I m trying to use crosswalk runtime in my android app. I tried this on android 4+.

I got some js & html codes and it worked perfect for me. But it is not working like android webview. In the webview i can call javascript functions from java code. But i couldnt find any option in crosswalk. Any idea?


Answer Source

Crosswalk support the similar API interface (evaluateJavascript) as Android WebView for calling JavaScript function from Java:

https://crosswalk-project.org/apis/embeddingapidocs/reference/org/xwalk/core/XWalkView.html#evaluateJavascript(java.lang.String, )

You can also use load for calling javascript function directly like: xwalkView.load("javascript:" + jsCode, null).

did you meet any issue with the Crosswalk API?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download