Introducing the CocoonJS Command Line interface and webview+ plugin for cordova

The main improvement of CocoonJS 2 was providing cordova compatibility to Ludei’s cloud compiler. With the cordova compiler, we also released the webview+, a chromium-based webview for android 4 and higher. You can use it directly from our cloud compiler.

The webview+ provides a chromium-based environment for your HTML5 hybrid apps. It will deliver same look’n feel across every android device on the market. As we promised, Android fragmentation is over!

The great news is that we want to share this development with the HTML5 and cordova community, so we are doing a public release of the main tools of our cloud compiler: the webview+ plugin for cordova and CocoonJS Command Line Interface.

The webview+ plugin for cordova enables your cordova-based apps to include a webview+ to run as the execution environment for your app. This plugin can be included in your current cordova android projects. What does this plugin provide?

  • Implements the cordova plugin API, so it interacts seamlessly with any cordova app
  • Webview+ provides remote debug for any cordova project. JS instrumentalization and live code changes, dynamic breakpoints, and all the power of the chrome developer tools
  • WebGL support for any android device running android 4 and higher.

Interested? You can get more info here. The project is hosted in our github here.

Other contribution we want to share with the community is the CocoonJS Command Line Interface. Standing on the shoulder of giants (cordova-cli), we’ve developed a Command Line Tool that eases the process of dealing with webview+ in Cordova projects. But, why another fork from cordova? Why another open source command line interface?

  1. Currently, installing webview+ manually is a bit tricky and the cocoonjs-cli eases the process, apart from reporting more meaningful error logs
  2. Cocoonjs-cli is cordova compliant, so the only difference you’ll notice is the command name, moving from cordova to cocoonjs
  3. The cocoonjs-cli also will be one of the remote interfaces for the cloud compiler. The cloud compiler enpoints are currently under development. We want to empower our users with tools that eases the process of managing their cloud projects
  4. Because we use extensively open source software and it’s time to give this love back to the community

Get more info abut the Cocoonjs-cli here. The source code is hosted in our github.

We encourage every HTML5 developer to download it, install, use, test and find bugs. We really would like to create a big community around these new projects.

Hail to open source!

 

9 Comments Introducing the CocoonJS Command Line interface and webview+ plugin for cordova

  1. avatarTxus Ordorika

    We wanted to release the cli asap, and webview+ needs more legal advice (and legal timming is longer than engineering).
    The idea is to release open source, also.

    Reply
  2. avatarJohn

    Had the same issue as Jonathan described. In my case it happened when deploying the app to Samsung Galaxy S3 [for galaxy S2 (android 4.2) and S4 (android 4.3) deployment went fine].
    Notes:
    1) Without using webview+ plugin, it works fine
    2) When using instead the cocoonjs cloud compilation, it also works fine
    3) A workaround is available by setting window._cordovaNative = true, as suggested in http://stackoverflow.com/questions/18623351/phonegap-3-alert-that-if-i-click-ok-crashes-broswer, however I noticed notification plugin gets broken as a consequent.

    It seems the installation of webview+ plugin cause the problem on Galaxy S3 and possibly in other devices. However, the cloud compiler seems to avoid the problem that occurs when using directly cocoonjs/cordova CLI with webview+.

    I’d like to know what modification is done in the cloud compiler (in comparison to cocoonjs CLI) that fixes this problem.

    Thanks!

    Full details:

    · CocoonJS CLI Version : cocoonjs@1.0.0-0.5.0

    · CordovaCLI Version : cordova@3.5.0-0.2.6

    · Other browsers tested: Internet Explorer: OK, Google Chrome OK.

    · Device info: Samsung Galaxy S3 running Android 4.1.2

    · Component: Cocoonjs CLI using Webview+

    · Basic description of the problem
    Instead of regular launching of the app, a prompt appear, such as in Jonathan screenshot: http://imgur.com/JQMOu3m

    · What steps will reproduce the problem?

    1) Create default android project with webview+ and notification plugin:
    cocoonjs create test com.test.app Test
    cocoonjs platform add android
    cocoonjs plugin add com.ludei.webview.plus
    cocoonjs plugin add org.apache.cordova.dialogs
    2) Build project:
    cocoonjs build
    3) Install apk in Samsung Galaxy S3
    4) Launch application

    · What is the expected result?

    App to be loaded normally

    · What happens instead?

    Got this: http://imgur.com/JQMOu3m
    App was not loaded

    Reply
  3. avatarJohn

    I noticed other people experienced the same issue. It appears that the problem is concerned with the version of the Android OS (4.1.2) and not the hosting device (galaxy s3).

    I’ll appreciate if anyone can advise about this.

    Thanks!

    Reply
  4. Pingback: The future of the CocoonJS Cordova Command Line Interface (CLI) | Ludei

Leave a Reply

Your email address will not be published. Required fields are marked *