Calling Java Methods with JavaScript from Crosswalk

mXWalkView = (XWalkView) findViewById(;
XWalkSettings webSettings = mXWalkView.getSettings();
public class JsInterface {
	public JsInterface() {
	public String sayHello() {
		return "Hello World!";
mXWalkView.addJavascriptInterface(new JsInterface(), "NativeInterface");
<a href="#" onclick="clicked()">Say Hello</a>
function clicked() {


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.