Showing posts with label crosswalk. Show all posts
Showing posts with label crosswalk. Show all posts

Friday, November 20, 2015

How to make an mobile app with PhoneGap and Crosswalk

How to make an mobile app with PhoneGap and Crosswalk


What is Crosswalk?

The Crosswalk Project is open source, released under a BSD licence. The project was founded by Intel's Open Source Technology Center. One can use WebGL via three.js and webrtc


By using the Crosswalk Project, an application developer can:


  • Use all the features available in modern web browsers and get over the old standard Android browser limitations..ugh
  • Access the latest recommended and emerging web standards.
  • Use experimental APIs not available in mainstream web browsers.
  • Control the upgrade cycle of an application by distributing it with its own runtime.
  • Add custom extensions to an application, to leverage platform features not exposed by Crosswalk or the standardized web platform.

Why we used it?

We made a elevens 2048 game which worked great in the latest Android but
not in older versions  < 4

Workflow


Install the Cordova Command Line Interface (CLI)

$ npm install -g cordova   //Check that the version of Cordova CLI is >= 5.0.0:

$ cordova -v
5.0.0

Install the Crosswalk WebView plugin

$ cordova plugin add cordova-plugin-crosswalk-webview

This adds the Crosswalk WebView cordova plugin into the app.

Build with Crosswalk WebView engine for Android


$ cordova build android

It is as simple as that.

This automatically fetches the stable Crosswalk WebView libraries from the Crosswalk Project download site (https://download.01.org/crosswalk/releases/crosswalk/android/) and build for both X86 and ARM architectures. 
For example, building a HelloWorld project generates:

/path/to/hello/platforms/android/build/outputs/apk/android-x86-debug.apk
/path/to/hello/platforms/android/build/outputs/apk/android-armv7-debug.apk
The Crosswalk WebView library will be embedded in your app. This adds about 18 MB to the APK size which may be a problem



Download the Elevens 2048 Crosswalk mobile game app here and enjoy the mobile game game Elevens like 2048