Embedded Chromium or Webkit in Android app

For our Android app, we would like to embed our own browser/rendering engine. The most likely candidate for this, is Webkit/Chromium. We are looking for something similar to WebView, essentially, but backed by a browser (version) that we control.

Background

Significant parts of our app consist of web page fragments embedded in the view (served by the app itself). We try to do this as transparently as possible (from a visual/user experience standpoint). So far, we have been using WebView for this and that works for the most part. Except when it doesn't.

Some phone vendors have unfortunately decided to tweak the standard Android browser here and there. In some cases, this breaks our app or makes the fact the we embed a web page more noticeable.

Our Idea

We'd like to have a component similar to WebView but where we control what version of Webkit/Chromium (or some other rendering engine) is being used. It wouldn't necessarily have to be the latest and greatest version. It is more important that we can get our app to work consistently across as many Android devices as possible.

So far

Our research so far has not turned up anything useful. We have found three dead attempts to port Webkit to NDK (the bare Webkit for Android port uses functionality not available in the NDK and thus not to app developers):

  • Webkit Android port by Company 100 (no updates for over two years)
  • mogo-browser (their last revision was to delete all source code)
  • NDK Webkit (officially abandoned by its author)

Looking on StackOverflow, we have also found a number of similar questions, most of which being solved by pointing to WebView (we already do that, and it's not good enough)

  • Webkit component for Android
  • Embed basic WebKit + V8 in my app
  • Embedding a newer version of WebKit with Android app

We are currently investigating whether Chromium for Android (or parts of it) can be turned into a library that our app could use. Has anyone else done this?

Update

After having a look at the chromeview project on GitHub (accepted answer), we decided that we'd rather wait for Google to release a Chrome-based WebView on future Android devices. The Chromium rendering engine turns out to be fairly large (~40MB), which doesn't leave much space for the actual app :(


Solution 1:

pwnall/chromeview · GitHub https://github.com/pwnall/chromeview

ChromeView works like Android's WebView, but is backed by the latest Chromium code.

Solution 2:

You should all check out the Crosswalk project. Sponsored by Intel, and in active development. They pull the Chromium sources and promise to make all new Chromium features available in Crosswalk within 6 weeks.

Crosswalk is a web runtime for ambitious HTML5 applications. It provides all the features of a modern browser, combined with deep device integration and an API for adding native extensions. It is especially suited to mobile devices.

Crosswalk supports Android 4.0 and newer, on ARM and Intel architectures.

Within in one hour of finding this project, I had my Cordova/Phonegap app running on an Android phone with Crosswalk. I'm glad I don't have to adjust my Javascript code to respect the shortcomings of the (pre-4.4) android.webkit.WebView.

https://crosswalk-project.org

Solution 3:

Without WebKit there is a GeckoView. Sure it adds over 20Mb of libs to the project.

Solution 4:

Nowadays, GeckoView seems an alternative to consider