Hi, thanks for the response.
I'm using this layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/background_dark" > <org.xwalk.core.XWalkView android:id="@+id/OverlayView" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#000000" /> <com.craftar.CraftARCameraView android:id="@+id/craftar_preview" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" /> </RelativeLayout> Do you mean this example https://crosswalk-project.org/documentation/android/embedding_crosswalk.html ? After I click OK in the Javascript prompts (i.e. gap: init), I get lots of console messages as this one: I/chromium: [INFO:CONSOLE(1083)] "processMessage failed: invalid message: """, source: file:///android_asset/www/cordova.js (1083) It seems to me that cordova bridge is not being well integrated...? Thx On 19 July 2016 at 03:53, Fu, Junwei <[email protected]> wrote: > 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
