Some background for the uninitiated: Cordova on Android 2.3 all the way up to Android 4.3 uses the stock Android browser to display apps. These browsers offer varying levels of compatibility and speed with modern websites- leading to a ton of debugging of Ionic apps built for older Android platforms. By using a library such as Crosswalk or Android ChromeView you’re running your app within an up to date version of Chrome, without the user having to have Chrome installed as an app on their phone. This, from what I have gathered tremendously improves speed and cuts down on issues such as taps and gestures not registering.
So I’ve read a couple of people have implemented it in their projects. I think it would be tremendously helpful for the whole community (as well as cutting down on the number of bug reports for the devs) if we could have some easy to follow steps on how to integrate this within our existing projects.
I know the thread @mquadrat, I was hoping somebody could provide some instructions on the forum. I know it would certainly cut down on support requests / bug reports if people start using these libraries instead of the stock Android browser in their Android builds.
Yeah I was also hoping for some advice. Seems like we have to figure it out on our own Not sure when I find a few hours to test it out. I’m very busy at the moment.
Well, I haven’t tackled it yet, but when I get around to deploying on Android I certainly intend to use Crosswalk myself if Ionic hasn’t yet rolled it (or ChromeView) into the cli.
I may play around with that sooner than I planned if others are interested. I think it’s going to be crucial for supporting Android. The stock web view on pre 4.4 devices is a donkey.
It’s pretty painless to migrate the code from ‘assets’ over to the CrossWalk preferred location if you use the CrossWalk ./bin/create command to use as a template. The biggest pain point was adapting to the workflow it forces on you - specifically using the ./bin/build and ./bin/run in the dev cycle (instead of cordova/ionic prepare/build/run) and switching from the ‘cordova’ binary to ‘plugman’ to manage plugins. Coincidentally CrossWalk solved a myriad of problems with elements that are generated dynamically that are missing (or rather disabled/invisible) on the device but appearing in a emulator or hosted environment.
I am not having any problems using Eclipse. The end result you should have are three projects (CordovaLib, xwalk, and the App). CordovaLib and xwalk are Libraries for the App project. In order for me to use the Angular Eclipse plugin I create a symlink to the assets folder (in my case www) and create a new Javascript project in Eclipse (for a total of four projects). With this setup I can run Ripple and deploy to emulator/device as well as jump into the Java source while building out the application.
If you want to build project again using “ionic build android” you can follow these steps:
Migrate project to CrossWalk as given on their website. Follow eclipse steps instead of replacing cordova library. (keep cordova library file on platform\android as it is, don’t replace)
I noticed that it changes project.properties file (when you import project in eclipse and change the dependencies)
I kept both project.properties file. (prior to project import in eclipse - projectC.properties, after import - projectT.properties)
I can confirm Crosswalk improves the scrolling and transition animations. Tested on Galaxy S4 4.4.2.
In Eclipse you import the crosswalk framework folder as a project. I used the Cordova Android (ARM) stable version.
Then Eclipse in project properties of the app, remove CordovaLib from Libraries and add Cordova and xwalk_core_library. Don’t forget to add Wifi and Network state permissions to Android manifest file.
It would be great if ionic CLI would support this.
I also used Crosswalk on a Galaxy S3, and solved many problems like phonecalls and various performance enhancements, specially on video. All the app feels much more responsive, and more native.
My way is probably the simplest: install all comand-line apps necessary (only needed to install python in my case, already had Ant and Java).
Then download a crosswalk-cordova zip (I used an 8 beta version, had zero problems).
Create a new app using the new template project. Then replace the <new app>/www content with your current Ionic <app>/www contents, and execute .\cordova\run.
If anyone is still facing issue in packing Ionic app with Crosswalk, check my response on below thread.
I use IntelXDK to package Ionic app with crosswalk and its simple few clicks, no command line required. I hope below link will help many, let me know if you face any issues in following the instructions.
I also packaged my ionic project with Intel XDK and crosswalk, however I didn’t see any animation performance improvement.
What improved my animation perf a little bit was using bindonce fix. It worked fine for a small list which used to suck with default ng-repeat. But when I use a slide animation for a view with resolve, it lags as usual.
I believe Android animation performance should be Ionic Team’s number 1 priority at this point.