• Stars
    star
    103
  • Rank 325,967 (Top 7 %)
  • Language
    Java
  • Created about 10 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Uniform webview on any Android 4.x device.

IMPORTANT: This project has been discontinued. For the latest Webview+ for Android, please go to the new Cocoon Cloud at http://cocoon.io.

The new Cocoon cloud is completely Cordova based and has enhanced features that include: the most up to date Webview+, new Cocoon plugins, a better Developer App, support for any Cordova plugin and a revamped UI.

Webview+ for Android

This project is a plugin for cordova/phonegap apps, and provides a uniform webview on any Android 4.x device..

Looking for Webview+ for iOs?

Webview+ Features, Advantages and Benefits

  • V8 Javascript VM
  • Works on Android 4.x
  • Latest HTML5 APIs
  • Compatible with Cordova Plugins
  • Better performance than system webview

Prerequisites

You'll need android SDK API level 19 installed in with your SDK tools.

How to install the Webview+ in your current project

Even though it's a cordova-compatible plugin, some steps must be done for the installation. If you prefer, you can install it automatically using the CocoonJS Command Line Interface.

The cocoonjs-cli has the same usage and commands of cordova-cli.

Once the cocoonjs-cli is installed in your system, just type:

// Install Ludei's CLI
$ sudo npm install -g cocoonjs

$ cocoonjs create MyProject
$ cd MyProject
$ cocoonjs platform add ios
$ cocoonjs plugin add com.ludei.webview.plus -d
$ cocoonjs run/emulate

The -d flag is used to activate the verbose mode.

Manual installation

The CocoonJS-CLI automates the installation of the Webview+, but if for some reason you want to install the Webview+ without the CocoonJS-CLI youโ€™ll have to do the following steps.

These steps are specific for Cordova 3.4.0 and higher. If you want to install manually Webview+ in previous versions, please, refer to the hooks in the cocoonjs-cli

Step 1

Clone the Webview+ repository in your computer:

git clone https://github.com/ludei/webview-plus.git

Step 2

Edit the following file by using your favorite text editor

_PATH_TO_YOUR_CORDOVA_PROJECT_/platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebview.java

Step 3

Find the following string inside CordovaWebview.java:

public class CordovaWebView extends WebView

Step 4

Replace the string you've found with these two strings:

import com.ludei.chromium.LudeiWebView;
public class CordovaWebView extends LudeiWebView 

Save and close the file

Step 5

Edit the following file:

_PATH_TO_YOUR_CORDOVA_PROJECT_/platforms/android/CordovaLib/project.properties

Step 6

Paste the following string and change the path after โ€œandroid.library.reference.1=โ€ to the relative path that points to your downloaded Webview+ (It must be a relative path and not an absolute path)

android.library.reference.1=../../../plugins/com.ludei.webview.plus/android

There you go. Now that you have installed the Webview+ in your project you can run the command โ€œ$ cordova buildโ€ and your app will benefit of the advantages of the Webview+.

If you want to know how the CocoonJS-CLI does these steps programatically, check the sources at android/hooks folder (after_plugin_add / after_plugin_rm).

Known bugs

  • Launching the Webview+ inside android's emulator can lead to an application crash. Use a real device for testing.
  • Current version may not reproduce sound files.
  • In some devices 3D context may not be created, this is due to a memory limitation of the device.
  • As android SDK API level 19 is required, if it is not installed properly in the machine, it will raise an "Unable to resolve project target 'Google Inc.:Google APIs:19'" compilation error. Here it is a step-by-step guide to solve this issue.

About the author

Ludei is a San Francisco based company, creators of CocoonJS. Ludei aims to empower HTML5 industry with a set of tools that eases the adoption of HTML5 as the target platform for every mobile development.

More Repositories

1

cocoonjs-cli

CocoonJS command line tool
JavaScript
46
star
2

Construct-2-plugin

JavaScript
41
star
3

cocoonjs-demos

List of sample demos showing the variety of things you can do with CocoonJS.
JavaScript
30
star
4

webview-plus-ios

This project is a plugin for cordova/phonegap apps, and provides a replacement for the UIWebView that includes the Nitro JS engine based on the WKWebView.
JavaScript
30
star
5

atomic-plugins-inapps

Atomic Plugins for InApps
Java
24
star
6

cocoonjs-plugins

Ludei's plugins are multiplatform Javascript APIs, that work in any of the three environments of CocoonJS: accelerated canvas, webview+ and system webview.
CSS
22
star
7

atomic-plugins-ads

Atomic Plugins for Ads
Objective-C
18
star
8

app-wear-demo

Ludei's wearable app demo
JavaScript
6
star
9

node-cocoonjs-cloud-api

Node.js REST Client for the CocoonJS Cloud API
JavaScript
5
star
10

threejs_demos

Subset of ThreeJS demos that run directly on canvas+
JavaScript
4
star
11

JavaScriptCore

The version of JavaScriptCore used in Cocoon Canvas+ for iOS with some internal modifications made by Ludei.
C++
4
star
12

atomic-plugins-share

Atomic Plugins Share
Java
3
star
13

atomic-plugins-social

Atomic Plugins for Social Services like Facebook, Game Center, Google Play Games, etc.
JavaScript
3
star
14

atomic-plugins-multiplayer

Atomic Plugins for Multiplayer
Objective-C
3
star
15

atomic-plugins-facebook

Cocoon Social Interface for Facebook Extension.
CSS
2
star
16

atomic-plugins-notifications

CSS
2
star
17

cordova_demo

Example of ludei demo running cordova extensions
CSS
2
star
18

atomic-plugins-googleplaygames

Cocoon Social Interface for the Google Play Games Extension.
Java
1
star
19

app_showcase

Showcase of cool HTML5 web apps
CSS
1
star
20

cocoon-common

The Cocoon Object that holds all the Cocoon JavaScript Plugins and other stuff needed for the Cocoon environment
JavaScript
1
star