Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hybrid Mobile Development with Ionic

You're reading from   Hybrid Mobile Development with Ionic Building highly interactive mobile apps

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781785286056
Length 242 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Gaurav Saini Gaurav Saini
Author Profile Icon Gaurav Saini
Gaurav Saini
Arrow right icon
View More author details
Toc

Adding Crosswalk browser

Older Android versions (4.0 - 4.3) that stock web view have low performance and lack many of the latest HTML5, CSS3, and JS features. You will see a lot of difference when you deploy your application on the latest Android 7.0 and in older versions. Here is when Crosswalk comes into the frame; Crosswalk gives the latest web view aligned with Chrome on Android. This increases the performance of both HTML/CSS rendering and JavaScript performance ten times. It reduces fluctuations and fragmentation among devices. Another set of features that Crosswalk brings is access to webGL, WebRTC, CSS3 features, and various APIs. It provides improved performance and debugging applications become really easy. The Cordova Crosswalk plugin helps you easily add the Crosswalk browser in your application:

$ ionic cordova:plugin add cordova-plugin-crosswalk- 
webview

Currently, supported browsers are Crosswalk and Crosswalk-lite for Android. You can use Crosswalk lite mode by passing a variable flag:

 $ ionic cordova:plugin add cordova-plugin-crosswalk-
webview --variable XWALK_MODE="lite"

Please take care that running these step will replace the default browser. Although you can anytime revert back by uninstalling the plugin and build again. The following are some advantages of using Crosswalk:

  • Gain in performance
  • Reduced fluctuations and fragmentation
  • Ease of debugging
  • HTML5 and CSS3 features
  • Access to webRTC, webGL, web Sockets, and so on

Another thing to note is that after you have added the Crosswalk browser you will see the size of your APK increase by around 15-20 MB and increased of size on disk when installed around 50 MB.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime