From MozillaWiki
Jump to: navigation, search

What is GeckoView

GeckoView is an Android library project that allows third-party developers to use Gecko as an Android View in their own applications. GeckoView is similar to Android's built in WebView, but it is not a drop in replacement for WebView.

Note that GeckoView is NOT ready to be used in a production environment. It is currently possible to load webpages, but that's about it. See bug 880107.

Using GeckoView

  1. Download and unzip and from here.
  2. Open Eclipse and import the GeckoView library project by doing File > Import.
  3. Set the imported GeckoView library project as a dependency in your app by adding it in the Android section of your project's properties as seen in the screenshot below. Geckoview settings.png
  4. Copy the assets folder from the to your app's assets folder.
  5. Add "manifestmerger.enabled=true" to your project's file.

Your directory structure should look like the following:

Geckoview project structure.png

You can now use GeckoView your app by including the following in a layout XML file:

  android:layout_height="wrap_content" />

You can then load a page in your code with:

GeckoView geckoView = (GeckoView) findViewById(;

Example App

The example app is a bare bones Android app that uses GeckoView. Clone the GeckoBrowser repository and follow the instructions above to add the GeckoView library to the app. Alternatively, you can use this fork, which allows to download the dependencies and build the GeckoBrowser app "à la make".

When running, it looks as such:

Geckoview example.png

Known Issues

Asset Compression - bug 908929

GeckoView assets (.so's) should not be compressed in final APK's built by 3rd-party developers. This may cause problems in some cases. See bug 908929.