I set out to make an Android game using Ionic (a flavor of Cordova) only to find out near the finish line that the performance was horrible on a real device. Versions of Android (>4.4) use an old native webview that has bad performance and a fraction of the awesome APIs modern web developers have come to know and love.
So I searched and searched and found a solution. Crosswalk! A build of Chromium you can package with your Cordova app. The project is managed by a Google employee and I think it's a safe bet to use until most devices are running Android 4.4 and above.
This is all great, but I found getting started to be a little complicated. So I created cordova-android-crosswalk a node tool to easily migrate your current project over to Crosswalk.
How easy you ask?
$ npm install -g cordova-android-crosswalk $ cd ~/projects/myCordovaProject $ cordova-android-crosswalk $ cordova run android
- Apache Cordova (3.5)
- All Cordova dependencies and PATH variables
- Huge performance boost
- Access to latest web APIs
- Increases file size by 17mb
- Adds another dependency to manage
Using my tool pretty much solves all the difficulty of Crosswalk. The only gotcha you might run into is that your Cordova projects must use and be initially built with Cordova 3.5. You can install this version by using
npm install -g firstname.lastname@example.org. This requirement is Crosswalks fault they only support Cordova 3.5 as off now.
I use Ionic and if you do too you're in luck! Ionic uses the same Cordova folder construct, which means this tool will work with Ionic out of the box. Just make sure you have Cordova 3.5 installed when building your Ionic project with
ionic start myProject.