UniversalAvenue / TiCrosswalk

WebView replacement for Titanium Mobile
Other
27 stars 12 forks source link

importing module to Appcelerator #12

Closed vanderleisp closed 9 years ago

vanderleisp commented 9 years ago

after some own mistakes I finally integrated the module into Appcelerator Studio, but now can't make it run as expected. basically added the below as to create the webview: function createWebView () { var xwalk = require('com.universalavenue.ticrosswalk'); return xwalk.createWebView(); }

var webView = createWebView({ url: '/HTML/index.html' , borderRadius:1 }); self.add(webView);

then the log file shows:

[ERROR] : E/ : Device driver API match [ERROR] : E/ : Device driver API version: 23 [ERROR] : E/ : User space API version: 23 [ERROR] : E/ : mali: REVISION=Linux-r3p2-01rel3 BUILD_DATE=Wed Oct 9 21:05:57 KST 2013 [INFO] : LibraryLoader: Expected native library version number "",actual native library version number "" [INFO] : chromium: [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0 [INFO] : BrowserStartupController: Initializing chromium process, singleProcess=true [INFO] : ResourceExtractor: Extracting resource icudtl.dat [INFO] : ResourceExtractor: Extracting resource xwalk.pak [INFO] : dalvikvm: Could not find method android.app.ActivityManager.isLowRamDevice, referenced from method org.chromium.base.SysUtils.detectLowEndDevice [WARN] : dalvikvm: VFY: unable to resolve virtual method 116: Landroid/app/ActivityManager;.isLowRamDevice ()Z [WARN] : dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/inputmethod/CursorAnchorInfo;) [INFO] : dalvikvm: Could not find method android.view.inputmethod.InputMethodManager.updateCursorAnchorInfo, referenced from method org.chromium.content.browser.input.InputMethodManagerWrapper.updateCursorAnchorInfo [WARN] : dalvikvm: VFY: unable to resolve virtual method 14674: Landroid/view/inputmethod/InputMethodManager;.updateCursorAnchorInfo (Landroid/view/View;Landroid/view/inputmethod/CursorAnchorInfo;)V [ERROR] : chromium: [ERROR:unix_domain_server_socket_posix.cc(106)] Not implemented reached in virtual int net::UnixDomainServerSocket::GetLocalAddress(net::IPEndPoint*) const [WARN] : BuiltinXWalkExtension: Failed to read JS API file: jsapi/presentation_api.js [WARN] : BuiltinXWalkExtension: Failed to read JS API file: jsapi/launch_screen_api.js [WARN] : BuiltinXWalkExtension: Failed to read JS API file: jsapi/contacts_api.js [WARN] : BuiltinXWalkExtension: Failed to read JS API file: jsapi/device_capabilities_api.js [WARN] : BuiltinXWalkExtension: Failed to read JS API file: jsapi/messaging_api.js [INFO] : TiCrosswalk: (main) [230,10058] onCreate [INFO] : TiCrosswalk: (main) [8,10066] onStart [INFO] : TiCrosswalk: (main) [4,10070] onResume [INFO] : TiCrosswalk: (main) [1,10071] onResume view found [INFO] : TiCrosswalk: (main) [109,10180] onPause [INFO] : TiCrosswalk: (main) [2,10182] onPause view found [INFO] : TiCrosswalk: (main) [7,10189] onStop

jonatansberg commented 9 years ago

You need to forward the arguments to the createWebView method, like this:

var xwalk = require('com.universalavenue.ticrosswalk');

function createWebView (props) {
  if (OS_ANDROID) {
    return xwalk.createWebView(props);
  }
  return Ti.UI.createWebView(props);
}

Edit: The borderRadius-propery might also be causing some rendering issus on Android.