Meteor + Crosswalk — Questions and progress


#1

Has anyone successfully wrapped the latest Meteor-version inside Crosswalk+Cordova? Is it possible to build a Meteor-project, copy the client code to a custom Cordova-wrapper, and then build and run the app on Android or maybe Windows Phone?

What I have tried so far:

  1. Build in meteor, customised the android project directory inserting Crosswalk and re-building with ant
    No successful builds. Keep getting build errors with several different version combinations of Crosswalk and Cordova.

  2. Build a tgz with Meteor, copy the html to a custom Cordova + Crosswalk wrapper
    I got the app to build, but got the following errors:

-Lots of plugin errors, fixed by making sure I had all the right versions of all the Cordova plugins Meteor uses

-Blank screen when Iron Router does not get this.next() at some point fixed by copying only the client html to Cordova’s www instead of Meteor’s custom cordova.js and cordova_plugins.js

-I still kept getting a blank screen and some errors in dev tools console, so I switched Cordova’s own built cordova.js and cordova_plugins.js to Meteor correspondents and let meteor start up from meteor_cordova_loader.js like its meant to

-Now i’m stuck with the Iron Router’s default screen (/home yadda yadda) and get a ‘serviceConfiguration’ error in the console

Meteor absolutely needs Crosswalk. Right now it makes apps run so much smoother than with Vanilla webview, and you dont have to worry about HTML/CSS compatibility as you have your own Chromium engine loading it.


#2

basic question - what is the main benefit of crosswalk? Android running on > 4.2 i think will use chromium webview by default. Are you trying to support older devices?

When i do a basic phonegap build the browser reports as chromium v30 - not the latest but good enough (and that maybe OS related, my test device i think is locked on a 4.4.2 )


#3

Are you sure of this? I can swear I have noticed a big difference between Cordova and Cordova+Crosswalk on our Samsung S2, Samsung S4 mini and Samsung S5, which all run 4.2 or newer if I remember right.

Either it’s a strong placebo or running with Crosswalk makes the app run much smoother, especially when using CSS animation and transitions. Haven’t tested Android 5 yet as it’s still a small minority, but I hear that it comes with a WebView that gets updates (ie. the newest Chromium-engine).


#4

The webview was reporting as chrome. my app isn’t super animation intensive, but with the old android webview i think there were some basic css features missing…

I just threw the output of the below into a view

Template.deviceInfo.helpers
  deviceInfo: ->
    info = {
      screen:
        width: screen.width
        height: screen.height
      document:
        height: document.body.clientHeight
        width: document.body.clientWidth
      devicePixelRatio: window.devicePixelRatio
      userAgent: navigator.userAgent
      vw: Modernizr.cssvwunit
      rem: Modernizr.cssremunit
    }
    info