GithubHelp home page GithubHelp logo

telemakhos / cordova-plugin-crosswalk-webview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crosswalk-project/cordova-plugin-crosswalk-webview

0.0 1.0 0.0 117.15 MB

Crosswalk WebView Cordova Plugin

License: Apache License 2.0

JavaScript 19.07% Java 80.93%

cordova-plugin-crosswalk-webview'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

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.
  • 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 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 using a <preference> tag within your config.xml. Some examples:

<!-- These are all equivalent -->
<preference name="CROSSWALK_ANDROID_VERSION" value="org.xwalk:xwalk_core_library_beta:13+" />
<preference name="CROSSWALK_ANDROID_VERSION" value="xwalk_core_library_beta:13+" />
<preference name="CROSSWALK_ANDROID_VERSION" value="13+" />
<preference name="CROSSWALK_ANDROID_VERSION" value="13" />

You can set command-line flags as well:

<!-- This is the default -->
<preference name="CROSSWALK_ANDROID_COMMANDLINE" value="--disable-pull-to-refresh-effect" />

Release Notes

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-plugin-crosswalk-webview's People

Contributors

agrieve avatar alexkvak avatar clelland avatar devgeeks avatar dmonllao avatar dpogue avatar fujunwei avatar huningxin avatar infil00p avatar mmocny avatar sidneys avatar

Watchers

 avatar

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.