I am getting the error
Exception junit.framework.AssertionFailedError: Please have your activity extend XWalkActivity for shared mode
in android crash reports. I have not been able to get this crash on testing. I have only used XWalkView in my game and not XWalkActivity. The implementation is as shown below.
XWalkView mXWalkView = new XWalkView(context);
MyJavaScriptInterface javaInterface = new MyJavaScriptInterface();
mXWalkView.addJavascriptInterface(javaInterface, "interOps");
mXWalkView.load("javascript:( function () { function createURL(event) { window.interOps.Callback(event.data); }window.addEventListener('message', createURL , false); } ) ()",null);
mXWalkView.load(URL, null);
mXWalkView.setResourceClient(new XWalkResourceClient(mXWalkView) {
@Override
public void onLoadFinished(XWalkView view, String url)
{
super.onLoadFinished(view, url);
}
});
Crash log points to the line
XWalkView mXWalkView = new XWalkView(context);
And I have integrated crosswalk in embedded mode and not shared mode; which is why this crash log is confusing. Can anyone help me figure out why this error is being thrown.