The second prominent reason was device and web browsers fragmentation. When you go beyond the most fundamental HTML5 and CSS3 you’ll notice things don’t quite work as you’d expect. You would find yourself spending more and more time testing your application on various devices, going slowly insane trying to fiddle with all those UI issues. Not to mention different Android WebViews having different web-kit implementations.
- Crosswalk is an open source project, hosted on GitHub, and licensed under the BSD licence.
- Supports Android (version 4.0 and above) and Tizen 3.0 (Common and IVI profiles).
- Crosswalk provides Android developers a unified Chromium-based rendering engine, resulting in better all-around performance and various 4.0+ Android devices. Your application won’t break in whatever web views or browsers your audience is using.
- All your devices, including older 4.0, will have access to most advanced APIs. Google Chrome is based on the Chromium-based rendering engine, so if you think Chrome is fast, think again what latest Chromium can do for you. This way you only need to worry about one runtime.
- Crosswalk applications have a different security model, which gives them access to the platform featured APIs, which are not available in the open web applications.
- Crosswalk isn’t aimed at classic web development; it’s aimed at hybrid mobile applications (HTML5, CSS, and JS); making it additionally optimized and faster.
- Crosswalk Project code is open source so you can modify it to your specific needs.
- While it is on the same level as Cordova/PhoneGap it can be combined with them
- WebGL, Web Audio, WebRTC support
Leave us a comment if you think we missed something.
- Only Available for Android 4.0 or Later, forget Android 2.X (then again who still works with such archaic platform).
- Yor app size will increase additional 20 MB, or 40MB if you want to merge both x86 and ARM application versions.
- Minor differences between runtime implementations still exist. This unification is still not on the same level as iOS devices.
- Crosswalk does not support iOS at this time. What is the point of unification if it is not available on all platforms, on the other hand, what would be the point in that.
- WebGL support will not work on blacklisted devices (it can be enforced manually).
- Canvas elements are not hardware accelerated on blacklisted GPUs.
- Not 100% compatible with the existing Android WebView API. Understandable if they don’t want to support old legacy APIs.
Leave us a comment if you think we missed something.
I will not end this article simply stating pros and cons of Crosswalk implementation approach. We’ll go even further creating a working Crosswalk/jQuery Mobile application.
Why jQuery Mobile, we could have used any other mobile framework? jQuery Mobile is known for, not be useful on older Android devices, or if you want to be harsh, on any Android device. This makes it a perfect candidate for our little experiment. Even better, it will provide us with a benchmark functionality. We will be able to benchmark page transitions that are usually slowish on most Android devices.
If you want to continue I will assume you have already installed/configured:
- 1. Apache Ant
- 2. nodeJS
- 4. Java JDK
- 5. Android SDK
I don’t want to cover complete Android environment setup; this article would become too large. If you miss something on this list, take a look here, it’s a step by step tutorial. Cordova is not needed for this tutorial so you can skip it.
Go to the official Phyton website and download the latest version, or any other if you don’t like to use latest versions. Download link:
Depending on your Windows platform (32 bit or 64 bit) select Windows Installer (.msi) and download it. Should I use Python 2 or Python 3 for my development activity? Short version: Python 2.x is a legacy, Python 3.x is the present and the future of the language so stick with it. During the installation process, you must remember final location. In this case, it’s:
Copy this location and add it to your environment PATH like. Take a look at this tutorial if you don’t know how to do that, you will find examples for Windows XP, Windows 2000 and Windows 7. It should look like this:
Download the Crosswalk Template
Go to the official Crosswalk Project website and download the latest template, or any other if you don’t like to use latest versions. I would suggest downloading stable version of Android (ARM + x86). Download link:
Unzip it, it should look something like this:
First make sure everything is installed correctly, open a command prompt and check this:
C:\>java -version java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b18) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
C:\>ant -version Apache Ant(TM) version 1.9.4 compiled on April 29 2014
C:\>python --version Python 3.4.2
C:\>adb help Android Debug Bridge version 1.0.32
Second, connect your Android smartphone with PC, don’t forget to enable USB debugging (Settings > Developer options > turn on USB debugging) and check if you can see a connected device:
C:\>adb start-server * daemon not running. starting it now on port 5037 * * daemon started successfully * C:\>adb devices List of devices attached 04455b69 device