Did the found view with id changed to the xwalkView?

<org.xwalk.core.XWalkView android:id="@+id/activity_main"
  xmlns:android="http://schemas.android.com/apk/res/android";
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">
</org.xwalk.core.XWalkView>

You can try to run the sample of embedding crosswalk in the cordova plugin.

Thanks,
Junwei.
From: Crosswalk-help 
[mailto:[email protected]] On Behalf Of Alvaro 
Trapote
Sent: Monday, July 18, 2016 5:29 PM
To: [email protected]
Subject: [Crosswalk-help] Using Crosswalk instead of SystemWebView in a Cordova 
plugin

Hi!

I'm trying to modify an existing Cordova plugin so it launches crosswalk 
instead of SystemWebView. The WebView is launched as follows:

 cameraView = (CraftARCameraView) layout.findViewById(previewId);
 wv = (SystemWebView)layout.findViewById(fakeR.getId("id", "OverlayView"));
 cordovaInterface = new CordovaInterfaceImpl((Activity) getContext());
 loadConfig();

 cwv = new CordovaWebViewImpl(new SystemWebViewEngine(wv));
 if (!cwv.isInitialized()){
    cwv.init(cordovaInterface, pluginEntries, preferences);
 }
 cwv.handleResume(true);
 if (!TextUtils.isEmpty(loadUrl)) {
    cwv.loadUrl(CraftARPlugin.ANDROID_FILE + loadUrl);
 }

All the examples I've seen embedding crosswalk are as in 
https://crosswalk-project.org/documentation/android/embedding_crosswalk.html 
,but this doesn't work for me. I'm getting errors (Javascript prompts as in 
http://stackoverflow.com/questions/16920596/phonegap-html-app-and-various-alerts-hang-browser).
 I reckon this is due to not getting a correct integration between crosswalk 
and cordova.

My code is:

 cameraView = (CraftARCameraView) layout.findViewById(previewId);
 mXWalkView = (XWalkView) findViewById(fakeR.getId("id", "OverlayView"));
 mXWalkView.load(CraftARPlugin.ANDROID_FILE + loadUrl, null);

Any help or guidance to carry on with the research would be very appreciated.

Thanks a lot
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to