Because CordovaWebView provided limited APIs, so there are no direct function to get XWalkView. But you can post message with plugin manager to Crosswalk plugin which can call own function.
You can refer the implementation of captureXWalkBitmap in XWalkWebViewEngine.java. Thanks, Junwei. From: Crosswalk-help [mailto:[email protected]] On Behalf Of Gabriel Arcos Sent: Friday, July 08, 2016 8:04 PM To: [email protected] Subject: [Crosswalk-help] Cordova how to get Crooswalk view instance Hi, There is any way to get a reference to the XWalkView Instance from within a Cordova plugin? Usually you do something like this to get a CordovaWebView reference: // Cordova 3.x, class CordovaWebView extends WebView, -> AbsoluteLayout -> ViewGroup -> View -> Object if(View.class.isAssignableFrom(CordovaWebView.class)) { return (View) webView; } // Cordova 4.0.0-dev, interface CordovaWebView { View getView(); } try { Method getViewMethod = CordovaWebView.class.getMethod("getView", (Class<?>[]) null); if(getViewMethod != null) { Object[] args = {}; return (View) getViewMethod.invoke(webView, args); } } catch (Exception e) { }
_______________________________________________ Crosswalk-help mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
