Giter Site home page Giter Site logo

cordova-crosswalk-engine's Introduction

cordova-plugin-crosswalk-webview

Makes your Cordova application use the Crosswalk WebView instead of the System WebView. Requires cordova-android 4.0 or greater.

Benefits

  • WebView doesn't change depending on Android version
  • Capabilities: such as WebRTC, WebAudio, Web Components
  • Performance improvements (compared to older system webviews)

Drawbacks

  • Increased memory footprint
    • An overhead of ~30MB (as reported by the RSS column of ps)
  • Increased APK size (about 17MB)
  • Increased size on disk when installed (about 50MB)
  • Crosswalk WebView stores data (IndexedDB, LocalStorage, etc) separately from System WebView
    • You'll need to manually migrate local data when switching between the two (note: this is fixed in Crosswalk 15)

Install

The following directions are for cordova-cli (most people). Alternatively you can use the Android platform scripts workflow.

  • Open an existing cordova project, with cordova-android 4.0.0+, and using the latest CLI. Crosswalk variables can be configured as an option when installing the plugin
  • Add this plugin
$ cordova plugin add cordova-plugin-crosswalk-webview
  • Build
$ cordova build android

The build script will automatically fetch the Crosswalk WebView libraries from Crosswalk project download site (https://download.01.org/crosswalk/releases/crosswalk/android/maven2/) and build for both X86 and ARM architectures.

For example, building android with Crosswalk generates:

/path/to/hello/platforms/android/build/outputs/apk/hello-x86-debug.apk
/path/to/hello/platforms/android/build/outputs/apk/hello-armv7-debug.apk

Note that you might have to run cordova clean before building, if you previously built the app without cordova-plugin-crosswalk-webview. Also, manually uninstall the app from the device/emulator before attempting to install the crosswalk-enabled version.

Also note that it is also possible to publish a multi-APK application on the Play Store that uses Crosswalk for Pre-L devices, and the (updatable) system webview for L+:

To build Crosswalk-enabled apks, add this plugin and run:

$ cordova build --release

To build System-webview apk, remove this plugin and run:

$ cordova build --release -- --minSdkVersion=21

Configure

You can try out a different Crosswalk version by specifying certain variables while installing the plugin, or by changing the value of xwalkVersion in your config.xml after installing the plugin. Some examples:

<!-- These are all equivalent -->
cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="org.xwalk:xwalk_core_library:14+"
cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="xwalk_core_library:14+"
cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="14+"
cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="14"
<preference name="xwalkVersion" value="org.xwalk:xwalk_core_library:14+" />
<preference name="xwalkVersion" value="xwalk_core_library:14+" />
<preference name="xwalkVersion" value="14+" />
<preference name="xwalkVersion" value="14" />

You can also use a Crosswalk beta version. Some examples:

<!-- These are all equivalent -->
cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="org.xwalk:xwalk_core_library_beta:14+"
<preference name="xwalkVersion" value="org.xwalk:xwalk_core_library_beta:14+" />

You can set command-line flags as well:

<!-- This is the default -->
cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_COMMANDLINE="--disable-pull-to-refresh-effect"
<preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />

You can use the Crosswalk shared mode which allows multiple Crosswalk applications to share one Crosswalk runtime downloaded from the Play Store.

<!-- These are all equivalent -->
cordova plugin add cordova-plugin-crosswalk-webview  --variable XWALK_MODE="shared"
<preference name="xwalkMode" value="shared" />

You can also use a Crosswalk beta version on shared mode, e.g.:

<!-- Using a Crosswalk shared mode beta version -->
cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="org.xwalk:xwalk_shared_library_beta:14+"

You can use the Crosswalk lite mode which is the Crosswalk runtime designed to be as small as possible by removing less common libraries and features and compressing the APK.

<!-- These are all equivalent -->
cordova plugin add cordova-plugin-crosswalk-webview  --variable XWALK_MODE="lite"
<preference name="xwalkMode" value="lite" />

You can set background color with the preference of BackgroundColor.

<!-- Set red background color -->
<preference name="BackgroundColor" value="0xFFFF0000" />

You can also set user agent with the preference of xwalkUserAgent.

<preference name="xwalkUserAgent" value="customer UA" />

Release Notes

2.3.0 (January 21, 2017)

  • Uses the latest Crosswalk 23 stable version by default

2.2.0 (November 4, 2016)

  • Uses the latest Crosswalk 22 stable version by default
  • Keep compatible for Cordova-android 6.0 with evaluating Javascript bridge
  • This version requires cordova-android 6.0.0 or newer

2.1.0 (September 9, 2016)

  • Uses the latest Crosswalk 21 stable version by default

2.0.0 (August 17, 2016)

  • Uses the latest Crosswalk 20 stable version by default
  • Discontinue support for Android 4.0 (ICS) in Crosswalk starting with version 20

1.8.0 (June 30, 2016)

  • Uses the latest Crosswalk 19 stable version by default

1.7.0 (May 4, 2016)

  • Uses the latest Crosswalk 18 stable version by default
  • Support to use Crosswalk Lite, It's possible to specify lite value with the variable of XWALK_MODE at install plugin time.
  • Cordova screenshot plugin can capture the visible content of web page with Crosswalk library.
  • Doesn't work with Crosswalk 17 and earlier

1.6.0 (March 11, 2016)

  • Uses the latest Crosswalk 17 stable version by default

  • Support to package apps for 64-bit devices, it's possible to specify 64-bit targets using the --xwalk64bit option in the build command:

      cordova build android --xwalk64bit
    

1.5.0 (January 18, 2016)

  • Uses the latest Crosswalk 16 stable version by default
  • The message of xwalk's ready can be listened

1.4.0 (November 5, 2015)

  • Uses the latest Crosswalk 15 stable version by default
  • Support User Agent and Background Color configuration preferences
  • Compatible with the newest Cordova version 5.3.4

1.3.0 (August 28, 2015)

  • Crosswalk variables can be configured as an option via CLI
  • Support for Crosswalk's shared mode via the XWALK_MODE install variable or xwalkMode preference
  • Uses the latest Crosswalk 14 stable version by default
  • The ANIMATABLE_XWALK_VIEW preference is false by default
  • Doesn't work with Crosswalk 14.43.343.17 and earlier

1.2.0 (April 22, 2015)

  • Made Crosswalk command-line configurable via <preference name="xwalkCommandLine" value="..." />
  • Disabled pull-down-to-refresh by default

1.1.0 (April 21, 2015)

  • Based on Crosswalk v13
  • Made Crosswalk version configurable via <preference name="xwalkVersion" value="..." />

1.0.0 (Mar 25, 2015)

  • Initial release
  • Based on Crosswalk v11

cordova-crosswalk-engine's People

Contributors

agrieve avatar alexkvak avatar alsorokin avatar clelland avatar cupidi avatar devgeeks avatar dmonllao avatar dpogue avatar drmoriarty avatar dstaubsauger avatar fujunwei avatar huningxin avatar infil00p avatar jerroydmoore avatar jstnpwll avatar mmocny avatar poshaughnessy avatar rakuco avatar sidneys avatar suhanmoon avatar vladimir-kotikov avatar xzhan96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cordova-crosswalk-engine's Issues

Cordova crosswalk with textAngular.js

Hello. I have a problem. My ionic application not correct working textAngular.js. When I click the Edit button(B, I, U), nothing happens, entered text is not edited. What is the problem? (cordova 6.0, cordova-android 5.1.0, crosswalk webview 14.42.334.0, ionic lib 1.2.4). Without it crosswalk-plugin is working correctly.

Performance problem, maybe has to do with multiple chromium initializations

Hi, I'm developing an app with cordova and I installed the crosswalk plugin.
The app is currently rather simple, yet the startup time has come to 7-8 seconds.
After inspecting logcat, I found some errors related to chromium which can easily be false positives.
However every time I launch the app, the logs are saying 3 times the following thing:
Initializing chromium process, singleProcess=true. Maybe this can be related to slow load times? Full logs below: http://paste.fedoraproject.org/306181/51576865/

Disable crosswalk for iOS but keep it for Android

Hi,

I may be getting confused but when I install the plugin it says "adding crosswalk for iOS"

Does this plugin also package in the crosswalk web view into iOS application ? If yes, is there a way to disable it? Since everything works fine for iOS so I thought not including it for iOS.

It is working fine and perfectly for my android version. I am using phone gap.

Thank you.

Multiple apks builded but not actually different

Hi!
I'm experiencing a strange behavior: until last week when I builded apks those was recognized respectively as x86 and armv7 when uploaded to the Play Store.
Now, even if I do the same tasks and I get the same two apks, those apks are recognized as compatible with all the native architecture available.

Is anything that happens just to me? Any ideas?

Thanks!

Server aborted the SSL handshake

As per subject, I got this error message like this when trying to install cordova plugin into the project.

Error: Command failed: Cloning into '/var/folders/p7/cjw0pmz13r5499fddl06980m0000gn/T/plugman/git/1434441055784'...
fatal: unable to access 'https://github.com/MobileChromeApps/cordova-plugin-crosswalk-webview/': Server aborted the SSL handshake

    at ChildProcess.exithandler (child_process.js:637:15)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Socket.<anonymous> (child_process.js:956:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)

Please advice. Thank you.

App Crashes on Start

I am unable to run my app with any of the crosswalk versions. The app crashes immediately on start. I tried different crosswalk versions but none of them are working. It happened after I updated the plugin few days ago.

Here is the log, i'm really not sure about the issue

[email protected]:/Users/abdulwahab/Documents/mobileapps/newnovitrix$adb logcat | grep walk
D/XWalkLib( 3425): Pre init xwalk core in com.novitrix.nerdhyve.MainActivity
D/XWalkLib( 3425): Reserve class class org.xwalk.core.XWalkPreferences to com.novitrix.nerdhyve.MainActivity
D/XWalkLib( 3425): Reserve class class org.xwalk.core.XWalkPreferences to com.novitrix.nerdhyve.MainActivity
D/XWalkLib( 3425): Reserve class class org.xwalk.core.XWalkPreferences to com.novitrix.nerdhyve.MainActivity
D/XWalkLib( 3425): Reserve class class org.xwalk.core.XWalkPreferences to com.novitrix.nerdhyve.MainActivity
D/XWalkLib( 3425): Reserve object class org.crosswalk.engine.XWalkCordovaView to com.novitrix.nerdhyve.MainActivity
D/XWalkLib( 3425): Reserve object class org.crosswalk.engine.XWalkCordovaResourceClient to com.novitrix.nerdhyve.MainActivity
D/XWalkLib( 3425): Reserve object class org.crosswalk.engine.XWalkCordovaUiClient to com.novitrix.nerdhyve.MainActivity
D/XWalkLib( 3425): Attach xwalk core
I/dalvikvm( 3425): DexOpt: unable to optimize static field ref 0x01be at 0x33 in Lorg/xwalk/core/internal/XWalkViewDelegate;.<clinit>
I/dalvikvm( 3425): DexOpt: unable to optimize static field ref 0x01be at 0x43 in Lorg/xwalk/core/internal/XWalkViewDelegate;.<clinit>
D/XWalkLib( 3425): java.lang.UnsatisfiedLinkError: Couldn't load xwalkcore from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.novitrix.nerdhyve-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.novitrix.nerdhyve-1, /vendor/lib, /system/lib]]]: findLibrary returned null
D/dalvikvm( 3425): Trying to load lib /data/data/com.novitrix.nerdhyve/app_xwalkcore/libxwalkcore.so 0x411e03d8
E/linker  ( 3425): load_library(linker.cpp:759): library "/data/data/com.novitrix.nerdhyve/app_xwalkcore/libxwalkcore.so" not found
E/dalvikvm( 3425): dlopen("/data/data/com.novitrix.nerdhyve/app_xwalkcore/libxwalkcore.so") failed: Cannot load library: load_library(linker.cpp:759): library "/data/data/com.novitrix.nerdhyve/app_xwalkcore/libxwalkcore.so" not found
D/XWalkLib( 3425): java.lang.UnsatisfiedLinkError: Cannot load library: load_library(linker.cpp:759): library "/data/data/com.novitrix.nerdhyve/app_xwalkcore/libxwalkcore.so" not found
D/XWalkLib( 3425): Created package context for org.xwalk.core
D/dalvikvm( 3425): open_cached_dex_file : /data/app/org.xwalk.core-1.apk /data/dalvik-cache/data@[email protected]@classes.dex
D/dalvikvm( 3425): Trying to load lib /data/app-lib/org.xwalk.core-1/libxwalkcore.so 0x4126ce28
D/dalvikvm( 3425): Added shared lib /data/app-lib/org.xwalk.core-1/libxwalkcore.so 0x4126ce28
D/dalvikvm( 3425): Trying to load lib /data/app-lib/org.xwalk.core-1/libxwalkcore.so 0x4126ce28
D/dalvikvm( 3425): Shared lib '/data/app-lib/org.xwalk.core-1/libxwalkcore.so' already loaded in same CL 0x4126ce28
D/XWalkLib( 3425): Dock xwalk core
D/XWalkLib( 3425): Init xwalk view
W/XWalkInternalResources( 3425): org.xwalk.core.R$styleable.ButtonCompat is not int.
W/XWalkInternalResources( 3425): org.xwalk.core.R$dimen.keyboard_accessory_fading_edge_length is not found.
W/XWalkInternalResources( 3425): org.xwalk.core.R$styleable.ButtonCompat is not int.
W/XWalkInternalResources( 3425): org.xwalk.core.R$dimen.keyboard_accessory_fading_edge_length is not found.
W/XWalkInternalResources( 3425): org.xwalk.core.R$styleable.ButtonCompat is not int.
W/XWalkInternalResources( 3425): org.xwalk.core.R$dimen.keyboard_accessory_fading_edge_length is not found.
W/XWalkInternalResources( 3425): org.xwalk.core.R$styleable.ButtonCompat is not int.
W/XWalkInternalResources( 3425): org.xwalk.core.R$dimen.keyboard_accessory_fading_edge_length is not found.
I/cr.base ( 3425): Extracting resource /data/data/com.novitrix.nerdhyve/app_xwalkcore/paks/xwalk.pak
I/cr.base ( 3425): Extracting resource /data/data/com.novitrix.nerdhyve/app_xwalkcore/icudtl.dat
D/XWalkLib( 3425): Post init xwalk core in com.novitrix.nerdhyve.MainActivity
D/XWalkLib( 3425): Init reserved class: class org.xwalk.core.XWalkPreferences
D/XWalkLib( 3425): Call reserved method: public static void org.xwalk.core.internal.XWalkPreferencesBridge.setValue(java.lang.String,boolean)
D/XWalkLib( 3425): Init reserved class: class org.xwalk.core.XWalkPreferences
D/XWalkLib( 3425): Call reserved method: public static void org.xwalk.core.internal.XWalkPreferencesBridge.setValue(java.lang.String,boolean)
D/XWalkLib( 3425): Init reserved class: class org.xwalk.core.XWalkPreferences
D/XWalkLib( 3425): Call reserved method: public static void org.xwalk.core.internal.XWalkPreferencesBridge.setValue(java.lang.String,boolean)
D/XWalkLib( 3425): Init reserved class: class org.xwalk.core.XWalkPreferences
D/XWalkLib( 3425): Call reserved method: public static void org.xwalk.core.internal.XWalkPreferencesBridge.setValue(java.lang.String,boolean)
D/XWalkLib( 3425): Init reserved object: class org.crosswalk.engine.XWalkCordovaView
E/chromium( 3425): [ERROR:xwalk_platform_notification_service.cc(103)] Not implemented reached in virtual bool xwalk::XWalkPlatformNotificationService::GetDisplayedPersistentNotifications(content::BrowserContext*, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >*)
E/chromium( 3425): [ERROR:xwalk_browser_context.cc(79)] Failed to read preference, error num: 0
I/dalvikvm( 3425): Could not find method android.os.StatFs.getBlockSizeLong, referenced from method org.xwalk.core.internal.extension.api.device_capabilities.DeviceCapabilitiesStorage$StorageUnit.updateCapacity
D/XWalkLib( 3425): Init reserved object: class org.crosswalk.engine.XWalkCordovaResourceClient
D/XWalkLib( 3425): Call reserved method: public void org.xwalk.core.internal.XWalkViewBridge.setResourceClientSuper(org.xwalk.core.internal.XWalkResourceClientBridge)
D/XWalkLib( 3425): Init reserved object: class org.crosswalk.engine.XWalkCordovaUiClient
D/XWalkLib( 3425): Call reserved method: public void org.xwalk.core.internal.XWalkViewBridge.setUIClientSuper(org.xwalk.core.internal.XWalkUIClientBridge)
D/XWalkLib( 3425): Call reserved method: class org.xwalk.core.internal.XWalkViewBridge.setXWalkViewInternalVisibilitySuper
W/System.err( 3425): java.lang.UnsupportedOperationException: class org.xwalk.core.internal.XWalkViewBridge.setXWalkViewInternalVisibilitySuper
W/System.err( 3425):    at org.xwalk.core.ReflectMethod.invoke(ReflectMethod.java:57)
W/System.err( 3425):    at org.xwalk.core.XWalkCoreWrapper.handlePostInit(XWalkCoreWrapper.java:169)
W/System.err( 3425):    at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:306)
W/System.err( 3425):    at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:277)
E/AndroidRuntime( 3425): java.lang.UnsupportedOperationException: class org.xwalk.core.internal.XWalkViewBridge.setXWalkViewInternalVisibilitySuper
E/AndroidRuntime( 3425):    at org.xwalk.core.ReflectMethod.invoke(ReflectMethod.java:57)
E/AndroidRuntime( 3425):    at org.xwalk.core.XWalkCoreWrapper.handlePostInit(XWalkCoreWrapper.java:169)
E/AndroidRuntime( 3425):    at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:306)
E/AndroidRuntime( 3425):    at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:277)

Windows Support

what would be the effort to add support for cordova-windows ?
As far as I understand, crosswalk is already available for windows. is it just a matter of piece it together?

build error when app name is utf-8 string

Utf-8 app name is not support,

when parse config.xml in platform/android/xwalk.gradle.

change line 35
def xml = file("res/xml/config.xml").getText()
to
def xml = file("res/xml/config.xml").getText("UTF-8")
maybe fix it

error: RPC failed; result=56, HTTP code = 200

As per subject, I got this error message like this when trying to install cordova plugin into the project.

Error: Command failed: Cloning into '/var/folders/p7/cjw0pmz13r5499fddl06980m0000gn/T/plugman/git/1434441332989'...
error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

    at ChildProcess.exithandler (child_process.js:637:15)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Socket.<anonymous> (child_process.js:956:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)

Please advice. Thank you.

Cordova app with CrossWalk crashes

When running a Cordova app with CrossWalk installed the app will crash. The error is provided below.

E/SysUtils: ApplicationContext is null in ApplicationStatus
E/ApkAssets: Error while loading asset assets/icudtl.dat: java.io.FileNotFoundException: assets/icudtl.dat
A/chromium: [FATAL:gpu_info_collector_android.cc(189)] failed to create a pbuffer surface for fetching driver strings. EGL_SUCCESS (3000)

Conflict between pushwoosh plugin and crosswalk plugin in ionic 2

Hello, I am using the cordova plugin-crosswalk but when I add the pushwoosh plugin to the project, the app no start because the app suddenly crash ("app was stopped").
In the android studio console I got the next log

Pub com.veureka.beopledev.firebaseinitprovider: com.google.firebase.provider.FirebaseInitProvider
FirebaseApp initialization unsuccessful
Could not find method android.app.Activity.checkSelfPermission, referenced from method org.apache.cordova.CordovaInterfaceImpl.hasPermission
VFY: unable to resolve virtual method 237: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
VFY: replacing opcode 0x6e at 0x0009
Could not find method android.app.Activity.requestPermissions, referenced from method org.apache.cordova.CordovaInterfaceImpl.requestPermissions
VFY: unable to resolve virtual method 291: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
VFY: replacing opcode 0x6e at 0x000a
D/AndroidRuntime: Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x413442a0)
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.veureka.beopledev/com.veureka.beopledev.MainActivity}: java.lang.RuntimeException: Failed to create webview.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Failed to create webview.
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:196)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:192)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:141)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:214)
at com.veureka.beopledev.MainActivity.onCreate(MainActivity.java:32)
at android.app.Activity.performCreate(Activity.java:5188)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135) 
at android.app.ActivityThread.access$700(ActivityThread.java:140) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4921) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.ClassNotFoundException: org.crosswalk.engine.XWalkWebViewEngine
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at java.lang.Class.forName(Class.java:172)
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:78)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:196) 
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:192) 
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:141) 
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:214) 
at com.veureka.beopledev.MainActivity.onCreate(MainActivity.java:32) 
at android.app.Activity.performCreate(Activity.java:5188) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135) 
at android.app.ActivityThread.access$700(ActivityThread.java:140) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4921) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.NoClassDefFoundError: org/crosswalk/engine/XWalkWebViewEngine
at java.lang.Class.classForName(Native Method) 
at java.lang.Class.forName(Class.java:217) 
at java.lang.Class.forName(Class.java:172) 
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:78) 
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:196) 
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:192) 
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:141) 
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:214) 
at com.veureka.beopledev.MainActivity.onCreate(MainActivity.java:32) 
at android.app.Activity.performCreate(Activity.java:5188) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135) 
at android.app.ActivityThread.access$700(ActivityThread.java:140) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4921) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.ClassNotFoundException: org.crosswalk.engine.XWalkWebViewEngine
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at java.lang.Class.classForName(Native Method) 
at java.lang.Class.forName(Class.java:217) 
at java.lang.Class.forName(Class.java:172) 
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:78) 
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:196) 
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:192) 
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:141) 
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:214) 
at com.veureka.beopledev.MainActivity.onCreate(MainActivity.java:32) 
at android.app.Activity.performCreate(Activity.java:5188) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135) 
at android.app.ActivityThread.access$700(ActivityThread.java:140) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4921) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 
at dalvik.system.NativeStart.main(Native Method) 
GC_CONCURRENT freed 236K, 12% free 7292K/8199K, paused 6ms+2ms, total 37ms
I/Process: Sending signal. PID: 22718 SIG: 9

other information
Cordova CLI: 6.3.0
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20
OS: Distributor ID: Deepin Description: Deepin 15.2
Node Version: v5.12.0

The plugins version
cordova-plugin-crosswalk-webview 1.8.0 "Crosswalk WebView Engine"
pushwoosh-cordova-plugin 6.2.0 "Pushwoosh"

I hope you can help me, thank you.

transformClassesWithMultidexlistForArmv7Debug

This is what i got after adding cordova-plugin-crosswalk-webview

Reading program jar [C:\Apache\AppServ\api\application\app-0.1\platforms\android\build\intermediates\transforms\jarMerging\armv7\debug\jars\1\1f\combined.jar]
Reading library jar [C:\android\android-sdk\build-tools\24.0.2\lib\shrinkedAndroid.jar]
Preparing output jar [C:\Apache\AppServ\api\application\app-0.1\platforms\android\build\intermediates\multi-dex\armv7\debug\componentClasses.jar]
Copying resources from program jar [C:\Apache\AppServ\api\application\app-0.1\platforms\android\build\intermediates\transforms\jarMerging\armv7\debug\jars\1\1f\combined.jar]
:transformClassesWithMultidexlistForArmv7Debug FAILED

BUILD FAILED

Total time: 1 mins 54.698 secs
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':transformClassesWithMultidexlistForArmv7Debug'.

    com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Error: cmd: Command failed with exit code 1 Error output:
    FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':transformClassesWithMultidexlistForArmv7Debug'.

    com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

i tried to using this
https://github.com/jwall149/cordova-multidex

but same issue !!

Error when opening app for the first time

Hello, I have developed an application and adicioneiu the crosswalk plugin, and performed the same test both on an Android 5.0 like a 4.4, testing on Android 5.0 occurred with no problem, but when trying to open the application after installing Crosswalk Runtime , the following error occurs only when I open the first application:

screenshot_2016-08-29-12-56-40

Is there any way around this, etc? Because from what I understand, when you quit the application before opening for the first time it opens normally without displaying errors.

Anomalies on writing files with cordova-plugin-file

Hi, first, this project is really essential for developing apps with Android <4.4, thanks for all contributors!

The problem:
I found that, with the support crosswalk, I have problems when writing files via the plugin cordova-file-plugin.
Without crosswalk, the app performed without problems reading and writing files operations using the appropriate plugin, as well as saving images through cordova-plugin-camera.

With crosswalk instead, the files are not written (I tried with dataDirectory and cacheDirectory), while the camera captured images are saved in the cache dir, but then are immediately deleted.

Access to the file is essential for my app, and it would be a shame to give up crosswalk because, for the rest, I find it PERFECT!

I have found the problem on devices with Android 4.1 and 4.4

Please tell me that there is a solution....

Accessing XWalkView from a custom Cordova Plugin's #initialize

Is it possible to access the instance of XWalkView from the initialize method of a Cordova plugin? Specifically, I'm looking to call setUserAgentString, eg:

public class MyPlugin extends CordovaPlugin {
  public void initialize(CordovaInterface cordova, CordovaWebView webView) {
          // xWalkView = ...? 
          // mXWalkView.getSettings().setUserAgentString("Custom UA String Here");
  }
}

I realize that I can set <preference name="xwalkUserAgent" value="..." /> in config.xml, but in this instance I need to append a string to the existing user agent, not replace it entirely.

OnFirstUserGestureObserved error with Crosswalk and Ionic

Also posted in Ionic issues as I'm not entirely sure where the issue lies.

I've created an Ionic project with the following plugins installed:

cordova-plugin-console 1.0.4 "Console"                                           
cordova-plugin-crosswalk-webview 2.1.0 "Crosswalk WebView Engine"                
cordova-plugin-device 1.1.3 "Device"                                             
cordova-plugin-facebook4 1.7.4 "Facebook Connect"                                
cordova-plugin-inappbrowser 1.5.0 "InAppBrowser"                                 
cordova-plugin-splashscreen 4.0.0 "Splashscreen"                                 
cordova-plugin-statusbar 2.2.0 "StatusBar"                                       
cordova-plugin-whitelist 1.3.0 "Whitelist"                                       
ionic-plugin-keyboard 2.2.1 "Keyboard"     

When clicking a button in the app that opens the in-app browser (e.g. a button executing $ionicFacebookAuth.login();) the following error is shown in the Android Studio console:

10-31 16:56:28.762 10855-10855/com.ionicframework.myapp333313 E/chromium: [ERROR:xwalk_autofill_client.cc(121)] Not implemented reached in virtual void xwalk::XWalkAutofillClient::OnFirstUserGestureObserved()

The device I can see the issue on is running Android 6.0.1. An older device running Android 4.2.2 works as expected.

Meteor 1.2.1 can't use corsswalk

When I use Meteor 1.2 add this plugin,can't conntection server

websocket' failed: Error during WebSocket handshake: Unexpected response code: 400",
source: http://meteor.local/b1e235ddc9235ce8ba0cdaad937534e401a74ecf.js?meteor_js_resource=true (51)
12-19 10:59:46.992 13793-13949/com.idwwr7qyg9emh1xn9jui V/meteor.cordova.updater﹕
remapUri http://123.57.23.127/sockjs/330/7co3vemu/xhr 12-19 10:59:46.992 13793-13949/com.idwwr7qyg9emh1xn9jui
D/meteor.cordova.updater﹕ Host is not intercepted: 123.57.23.127 12-19 10:59:47.032 13793-13793/com.idwwr7qyg9emh1xn9jui
I/chromium﹕ [INFO:CONSOLE(0)] "XMLHttpRequest cannot load http://123.57.23.127/sockjs/330/7co3vemu/xhr.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://meteor.local' is therefore not allowed access. The response had HTTP status code 503.",
source: http://meteor.local/ (0) 12-19 11:01:09.562 13793-13949/com.idwwr7qyg9emh1xn9jui
D/dalvikvm﹕ GC_FOR_ALLOC freed 1753K, 22% free 7206K/9140K, paused 39ms, total 39ms 12-19 11:01:48.452
13793-13949/com.idwwr7qyg9emh1xn9jui V/meteor.cordova.updater﹕ remapUri http://123.57.23.127/sockjs/info?cb=lh2z6ekxw6 12-19 11:01:48.452 13793-13949/com.idwwr7qyg9emh1xn9jui D/meteor.cordova.updater﹕ Host is not intercepted: 123.57.23.127 12-19 11:01:48.692 13793-13793/com.idwwr7qyg9emh1xn9jui I/chromium﹕ [INFO:CONSOLE(51)] "WebSocket connection to 'ws://123.57.23.127/sockjs/592/_0onywf6/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400", source: http://meteor.local/b1e235ddc9235ce8ba0cdaad937534e401a74ecf.js?meteor_js_resource=true (51) 12-19 11:01:48.692 13793-13949/com.idwwr7qyg9emh1xn9jui V/meteor.cordova.updater﹕ remapUri http://123.57.23.127/sockjs/592/yutu8day/xhr 12-19 11:01:48.692 13793-13949/com.idwwr7qyg9emh1xn9jui D/meteor.cordova.updater﹕ Host is not intercepted: 123.57.23.127 12-19 11:01:48.722 13793-13793/com.idwwr7qyg9emh1xn9jui I/chromium﹕ [INFO:CONSOLE(0)] "XMLHttpRequest cannot load http://123.57.23.127/sockjs/592/yutu8day/xhr. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://meteor.local' is therefore not allowed access. The response had HTTP status code 503.", source: http://meteor.local/ (0)

Tks For you help.

Cannot build app

Please Any Help with that !!

BUILD FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileArmv7DebugJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Total time: 1 mins 40.227 secs
    Error: cmd: Command failed with exit code 1 Error output:
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaClientCertRequest.java:22: error: cannot find symbol
    import org.xwalk.core.ClientCertRequest;
    ^
    symbol: class ClientCertRequest
    location: package org.xwalk.core
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaClientCertRequest.java:31: error: cannot find symbol
    private final ClientCertRequest request;
    ^
    symbol: class ClientCertRequest
    location: class XWalkCordovaClientCertRequest
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaClientCertRequest.java:33: error: cannot find symbol
    public XWalkCordovaClientCertRequest(ClientCertRequest request) {
    ^
    symbol: class ClientCertRequest
    location: class XWalkCordovaClientCertRequest
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaHttpAuthHandler.java:22: error: cannot find symbol
    import org.xwalk.core.XWalkHttpAuthHandler;
    ^
    symbol: class XWalkHttpAuthHandler
    location: package org.xwalk.core
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaHttpAuthHandler.java:30: error: cannot find symbol
    private final XWalkHttpAuthHandler handler;
    ^
    symbol: class XWalkHttpAuthHandler
    location: class XWalkCordovaHttpAuthHandler
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaHttpAuthHandler.java:32: error: cannot find symbol
    public XWalkCordovaHttpAuthHandler(XWalkHttpAuthHandler handler) {
    ^
    symbol: class XWalkHttpAuthHandler
    location: class XWalkCordovaHttpAuthHandler
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaResourceClient.java:32: error: cannot find symbol
    import org.xwalk.core.ClientCertRequest;
    ^
    symbol: class ClientCertRequest
    location: package org.xwalk.core
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaResourceClient.java:33: error: cannot find symbol
    import org.xwalk.core.XWalkHttpAuthHandler;
    ^
    symbol: class XWalkHttpAuthHandler
    location: package org.xwalk.core
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkWebViewEngine.java:51: error: cannot find symbol
    import org.xwalk.core.XWalkGetBitmapCallback;
    ^
    symbol: class XWalkGetBitmapCallback
    location: package org.xwalk.core
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaResourceClient.java:132: error: cannot find symbol
    public void onReceivedHttpAuthRequest(XWalkView view, XWalkHttpAuthHandler handler,
    ^
    symbol: class XWalkHttpAuthHandler
    location: class XWalkCordovaResourceClient
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaResourceClient.java:148: error: cannot find symbol
    public void onReceivedClientCertRequest(XWalkView view, ClientCertRequest request) {
    ^
    symbol: class ClientCertRequest
    location: class XWalkCordovaResourceClient
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaResourceClient.java:131: error: method does not override or implement a method from a supertype
    @OverRide
    ^
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaResourceClient.java:147: error: method does not override or implement a method from a supertype
    @OverRide
    ^
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkWebViewEngine.java:109: error: cannot find symbol
    new XWalkGetBitmapCallback() {
    ^
    symbol: class XWalkGetBitmapCallback
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkWebViewEngine.java:204: error: cannot find symbol
    webView.setUserAgentString(webView.getUserAgentString() + " " + appendUserAgent);
    ^
    symbol: method getUserAgentString()
    location: variable webView of type XWalkCordovaView
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkWebViewEngine.java:232: error: cannot find symbol
    webView.getExtensionManager().loadExtension(XWALK_EXTENSIONS_FOLDER + File.separator + path);
    ^
    symbol: method getExtensionManager()
    location: variable webView of type XWalkCordovaView
    C:\Apache\AppServ\api\application\app-0.1\platforms\android\src\org\crosswalk\engine\XWalkCordovaView.java:93: error: method does not override or implement a method from a supertype
    @OverRide
    ^
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    17 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileArmv7DebugJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Bluetooth buttons does not work with Crosswalk Cordova

I created an empty Cordova (5.3.3) project with just Android platform then I added the “cordova-plugin-crosswalk-webview” plugin. When the app is in foreground, it seems that crosswalk webview intercepts any media button actions. So when I press the Play/Pause buttons of my Bluetooth, nothing happens. I don’t have any media elements in my app. Any idea on how I can solve this problem?

Steps:
cordova create myapp
cordova platform add android
cordova plugin add cordova-plugin-crosswalk-webview
cordova run
When app is running on device, press the bluetooth button

How to use crosswalk Launch Screen from a Cordova app?

I'm trying to figure out how to use the Launch Screen feature of crosswalk in a cordova/ionic app.

The crosswalk configuration go into config.xml (stuff like xwalkMode and xwalkVersion) but looks like the launch screen should go in the manifest that is loaded from the activity.

Appreciate any guidance on the issue.

Android Accessibility support

Hi,

First, big thanks to this project and the new easy plugin install with Cordova 4+.

Without Crosswalk, (so with the Android System WebView 46+), in my app, when I active the TalkBack and the large text, it works great.
With Crosswalk (Chrome/44.0.2403.157 Crosswalk/15.44.384.13), it works great but :

  • The text doesn't grow up.
  • Green border of focus-interactive region doesn't show.

I don't know if it is the same on iOS. May be there is something to set in the parameter "xwalkCommandLine" ? Or maybe Crosswalk uses Chrome 44 and this accessibility options are compatible with an higher version of Chrome ?

Issue with arabic language

There is issue with Arabic language as its characters should not be splitted up from each other as English languages.

What behavior are you expecting?
أحمد

What result after using crosswalk:
أح م د

What should i do as i'm using
org.xwalk:xwalk_core_library:14+
lite Mode

    <preference name="xwalkVersion" value="org.xwalk:xwalk_core_library:14+" />
    <preference name="xwalkMode" value="lite" />

I'm following these to install crosswalk
cordova platform remove android
cordova plugin ls
cordova plugin remove cordova-plugin-crosswalk-webview
cordova plugin add cordova-plugin-crosswalk-webview
cordova platform add android
cordova build android -- --minSdkVersion=16

cordova-plugin-x-toast can't pop up message

code:
$cordovaToast.showShortBottom(response.msg || "未知错误");
logcat:
[ERROR:xwalk_autofill_client.cc(172)] Not implemented reached in virtual void xwalk::XWalkAutofillClient::OnFirstUserGestureObserved()

Cordova App Crash when using xwalk plugin

Hi guys,

Env.

  • cordova#6.0.0
  • angular#1.4.3
  • ionic#1.2.4
  • android studio#1.5.1

Test Device

  • Samsung S6#5.1.1

I add file "gradle.properties" in the platform/android that content is android.useDeprecatedNdk=true to avoid build error.

When app build success and ready to star that crash happened.

key meesage:
java.lang.ClassCastException: org.crosswalk.engine.XWalkCordovaView cannot be cast to android.webkit.WebView

Any idea about this ?

detail log:
03-22 10:00:33.323 16484-16484/? E/AndroidRuntime: FATAL EXCEPTION: main Process: ttt.apps.www.np, PID: 16484 java.lang.RuntimeException: Unable to start activity ComponentInfo{ttt.apps.www.np/tt.apps.www.np.MainActivity}: java.lang.ClassCastException: org.crosswalk.engine.XWalkCordovaView cannot be cast to android.webkit.WebView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3119) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218) at android.app.ActivityThread.access$1000(ActivityThread.java:198) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6837) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) Caused by: java.lang.ClassCastException: org.crosswalk.engine.XWalkCordovaView cannot be cast to android.webkit.WebView at ttt.apps.www.np.MainActivity.onCreate(MainActivity.java:83) at android.app.Activity.performCreate(Activity.java:6500) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218)  at android.app.ActivityThread.access$1000(ActivityThread.java:198)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:145)  at android.app.ActivityThread.main(ActivityThread.java:6837)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 

Set cookies on initialisation

I want to know if it is possible to create cookies for initializing crosswalk before the URL is loaded ?
I tried to use XWalkCookieManager class in the onCreate method of CordovaActivity class but application crash at launch (Unsupported method setCookie) because i think it is not possible as long as crosswalk is not initialized. I also tried with android.webkit.CookieManager class ; the application starts but cookies are not present on javascript side.
The need is to create cookies before the page is loaded at startup.
Is this possible and how to do?
Thank you in advance for your explanations.

WebVR - Crosswalk WebView doesn't support the latest version

Hi,

I'm trying to implement WebVR in a Cordova project by using CrossWalk WebView on Android. If I try the example project from below, in other WebViews it says "Your browser does not support WebVR", on CrossWalk says "Your browser supports WebVR but not the latest version" and WebVR does not work. Could you please give me any info about this issue or how it can be resolved?

"A network change was detected" error

When I use this cordova plugin to add crosswalk to my cordova project, all works fine. But after some periods of inactivity, or if something changes on the network (change wifi connection etc), then when you open the app, you get a modal ""A network change was detected" and the app quits. You then have to re-open the app.

There seem to be various bugs filed with the crosswalk project related to similar sounding issues, I was wondering if there is any specific related to this plugin that we can change as a workaround?

It seems a pretty major flaw - it would mean users are constantly getting the message and having to close and re-open the app....

FLAG_SECURE doesn't work on some devices

I working on Cordova Application on Android.

The FLAG_SECURE don't allow user to take screenshot and when the application is in background, he have to see a white screen to protect information in the last view.

My problem is when I add cordova-crosswalk-engine in my project, the FLAG_SECURE working only on some devices...

I try with :

List devices tested with success :
Samsung Galaxy S5
Nexus 6 - 6.0.1
Motorola Moto 4G - 5.0.2

List devices tested with error :
Samsung Galaxy Note 2 - 4.1.2
Sony Xperia Z5 - 6.0.1
Samsung Galaxy Ace 4 - 4.4.4

Crosswork building failing

When I run:

cordova run android

The build process fails and gives me this error message:

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 7.259 secs

/home/hamid/Projects/doctor/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /home/hamid/Projects/doctor/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/hamid/Projects/doctor/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true
ERROR running one or more of the platforms: Error: /home/hamid/Projects/doctor/platforms/android/cordova/run: Command failed with exit code 1
You may not have the required environment or OS to run this project

cordova build fails

After having successfully created builds with cordova build android and this plugin installed before, now after some weeks the build fails:

FAILURE: Build failed with an exception.

* Where:
Script '/path/to/cordova/platforms/android/cordova-plugin-crosswalk-web
view/beta-xwalk.gradle' line: 86

* What went wrong:
A problem occurred configuring root project 'android'.
> Cannot add task ':createXwalkCommandLineFileArmv7Debug' as a task with that name already exists.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log ou
tput.

Add script to repo

sh fetch_libs.sh mentioned in the readme isn't part of the repo, where might that live?

Possibility to disable ANIMATABLE_XWALK_VIEW via config.xml

Always enabled

boolean prefAnimatable = preferences == null ? false : preferences.getBoolean("CrosswalkAnimatable", false);
            boolean manifestAnimatable = ai.metaData == null ? false : ai.metaData.getBoolean("CrosswalkAnimatable");
            if (prefAnimatable || manifestAnimatable) {
                // Slows it down a bit, but allows for it to be animated by Android View properties.
                XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW, true);
            }

File-Transfer does not work with crosswalk-webview plugin

My cordova project make use of the file-transfer plugin. When the Webview plugin is installed, all File-transfer (upload) Requests results in a 403 error: unauthorized :/

Sombebody knows why and can help me out with a quick fix?

update: also i can not open geo: uri's with the crosswalk webview.

Camera option is not showing in file input (Crosswalk webwiew)

@infil00p @rakuco using crosswalk webwiew lite in my project and Iam using a remote web page in the webwiew which has a input file button. when i click file input button a dialogue poup is showing to select options but camera option is missing in the popup dialogue.
If we open the same url in native browser i can see camera option.
Remote url that i am using in the app : http://rest.6te.net/indexcam.htm
**Testing environment :**Samsung s6 (android 6) and genymotion android(6,5)

screen shot from crosswalk lite webview app(without camera option)
screen shot 2016-09-24 at 6 31 55 pm

Screenshot from native browser(with camera option)
screen shot 2016-09-24 at 6 38 55 pm

Override XWalkCordovaResourceClient#onReceivedLoadError in onCreate

Is it possible to override onReceivedLoadError in MainActivity#onCreate? With the cordova crosswalk plugin, onReceivedLoadError is defined in XWalkCordovaResourceClient, but I'd like to define my own functionality without having to edit that file.

I had something that almost worked ---- but my custom Cordova plugins were no longer called. I suspect I was overriding an existing hook incorrectly:

public class MainActivity extends CordovaActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.init();
        XWalkView webView = ((XWalkView) this.appView.getEngine().getView());
        initializeXWalkViewClients(webView);
        loadUrl(launchUrl);
    }

    private void initializeXWalkViewClients(XWalkView xwalkView) {
        xwalkView.setResourceClient(new XWalkResourceClient(xwalkView) {
                @Override
                public void onReceivedLoadError(XWalkView view, int errorCode, String description,
                             String failingUrl) {
                                       // ...
                }
        });
    }

Any thoughts?

On received SSL errors show dialog box

There is difference in behavior between Cordova and Cordova with cordova-plugin-crosswalk-webview when handling SSL errors . When using plugin a dialog "Ssl Certificate Error Alert" is shown. I think this is crosswalks default behavior when SSL error occurs.
Without the plugin cordova rejects the request when build in release or process it when build in debug.
Make the plugin behaves like the original cordova. The ssl certificate error alert is not very useful it cant be customized and even worse the client is given to choose in a situation that myth be a security breach

App crash when open on Android 4.4.2

My app always crash on start with crosswalk 19+. It happened on android 4.4 only, on android 5.0 and later app can run normally.
Here is the log.

E/dalvikvm: Could not find class 'org.xwalk.core.XWalkActivityDelegate', referenced from method org.crosswalk.engine.XWalkWebViewEngine.<init>
W/dalvikvm: VFY: unable to resolve new-instance 8660 (Lorg/xwalk/core/XWalkActivityDelegate;) in Lorg/crosswalk/engine/XWalkWebViewEngine;
W/dalvikvm: VFY: unable to find class referenced in signature (Lorg/xwalk/core/XWalkView;)
W/dalvikvm: VFY: unable to find class referenced in signature (Lorg/xwalk/core/XWalkView;)
W/dalvikvm: VFY: unable to find class referenced in signature (Lorg/xwalk/core/XWalkView;)
W/dalvikvm: VFY: unable to resolve virtual method 64438: Lorg/xwalk/core/XWalkView;.addJavascriptInterface (Ljava/lang/Object;Ljava/lang/String;)V
W/dalvikvm: Unable to resolve superclass of Lorg/crosswalk/engine/XWalkCordovaView; (8685)
W/dalvikvm: Link of class 'Lorg/crosswalk/engine/XWalkCordovaView;' failed
W/dalvikvm: Unable to resolve superclass of Lorg/crosswalk/engine/XWalkCordovaView; (8685)
W/dalvikvm: Link of class 'Lorg/crosswalk/engine/XWalkCordovaView;' failed
W/dalvikvm: VFY: unable to resolve virtual method 59313: Lorg/crosswalk/engine/XWalkCordovaView;.setVerticalScrollBarEnabled (Z)V
W/dalvikvm: Unable to resolve superclass of Lorg/crosswalk/engine/XWalkCordovaView; (8685)
W/dalvikvm: Link of class 'Lorg/crosswalk/engine/XWalkCordovaView;' failed
W/dalvikvm: Unable to resolve superclass of Lorg/crosswalk/engine/XWalkCordovaView; (8685)
W/dalvikvm: Link of class 'Lorg/crosswalk/engine/XWalkCordovaView;' failed
W/dalvikvm: VFY: unable to resolve virtual method 59295: Lorg/crosswalk/engine/XWalkCordovaView;.getExtensionManager ()Lorg/xwalk/core/XWalkExternalExtensionManager;
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: VFY: unable to resolve virtual method 64378: Lorg/xwalk/core/XWalkActivityDelegate;.isXWalkReady ()Z
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: VFY: unable to resolve virtual method 64378: Lorg/xwalk/core/XWalkActivityDelegate;.isXWalkReady ()Z
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: VFY: unable to resolve virtual method 64378: Lorg/xwalk/core/XWalkActivityDelegate;.isXWalkReady ()Z
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: VFY: unable to resolve virtual method 64378: Lorg/xwalk/core/XWalkActivityDelegate;.isXWalkReady ()Z
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: Link of class 'Lorg/xwalk/core/XWalkActivityDelegate;' failed
W/dalvikvm: VFY: unable to resolve virtual method 64378: Lorg/xwalk/core/XWalkActivityDelegate;.isXWalkReady ()Z
W/dalvikvm: Unable to resolve superclass of Lorg/crosswalk/engine/XWalkCordovaView; (8685)
W/dalvikvm: Link of class 'Lorg/crosswalk/engine/XWalkCordovaView;' failed
W/dalvikvm: VFY: returning Ljava/lang/Object; (cl=0x0), declared Landroid/view/View; (cl=0x0)
W/dalvikvm: VFY:  rejecting opcode 0x11 at 0x0002
W/dalvikvm: VFY:  rejected Lorg/crosswalk/engine/XWalkWebViewEngine;.getView ()Landroid/view/View;
W/dalvikvm: Verifier rejected class Lorg/crosswalk/engine/XWalkWebViewEngine;
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x433101a0)
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.appman.cordova.agentmate, PID: 5457
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appman.cordova.agentmate/com.appman.cordova.agentmate.MainActivity}: java.lang.RuntimeException: Failed to create webview. 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2404)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Failed to create webview. 
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:195)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:192)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:141)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:213)
at com.appman.cordova.agentmate.MainActivity.onCreate(MainActivity.java:80)
at android.app.Activity.performCreate(Activity.java:5541)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2368)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464) 
at android.app.ActivityThread.access$900(ActivityThread.java:172) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:146) 
at android.app.ActivityThread.main(ActivityThread.java:5653) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.ClassNotFoundException: org.crosswalk.engine.XWalkWebViewEngine
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:251)
at java.lang.Class.forName(Class.java:216)
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:78)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:195) 
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:192) 
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:141) 
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:213) 
at com.appman.cordova.agentmate.MainActivity.onCreate(MainActivity.java:80) 
at android.app.Activity.performCreate(Activity.java:5541) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2368) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464) 
at android.app.ActivityThread.access$900(ActivityThread.java:172) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:146) 
at android.app.ActivityThread.main(ActivityThread.java:5653) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.VerifyError: org/crosswalk/engine/XWalkWebViewEngine
at java.lang.Class.classForName(Native Method) 
at java.lang.Class.forName(Class.java:251) 
at java.lang.Class.forName(Class.java:216) 
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:78) 
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:195) 
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:192) 
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:141) 
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:213) 
at com.appman.cordova.agentmate.MainActivity.onCreate(MainActivity.java:80) 
at android.app.Activity.performCreate(Activity.java:5541) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2368) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464) 
at android.app.ActivityThread.access$900(ActivityThread.java:172) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:146) 
at android.app.ActivityThread.main(ActivityThread.java:5653) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) 
at dalvik.system.NativeStart.main(Native Method) 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.