Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

GeckoView is different from Gecko, which is already used by Firefox Android. I heard GeckoView is closer to Android's WebView API and designed for easy embedding into apps.


You're right, GeckoView [0] is a lot like WebView.

    GeckoView view = findViewById(R.id.geckoview);
    GeckoSession session = new GeckoSession();
    GeckoRuntime runtime = GeckoRuntime.create(this);

    session.open(runtime);
    view.setSession(session);
    session.loadUri("about:buildconfig");
[0] https://mozilla.github.io/geckoview/


Yes. GeckoView is currently used in Firefox Preview, Firefox Focus (on Android), Firefox Reality (VR browser), and some Mozilla test apps. There are a few third-party developers already using GeckoView to embed web content in their apps.

One advantage of using GeckoView in your app instead of WebView is that you know exactly which Gecko engine version and features are available; you don't have to support old random WebView versions across different Android devices and OS versions.


>One advantage of using GeckoView in your app instead of WebView is that you know exactly which Gecko engine version and features are available; you don't have to support old random WebView versions across different Android devices and OS versions.

Is this similar to how each Electron app uses a bundled version of Chromium (which takes up disk space), as opposed to web apps which have to run in whatever Chrome version (or other browser) the user has installed?

Firefox Focus on Android is quite a large app (132MB installed on my phone), even though on my phone, it uses either Chrome or WebView (bundled Gecko is disabled).


> Is this similar to how each Electron app uses a bundled version of Chromium (which takes up disk space),

At the moment, yes. In Android 10, Chrome and WebView are sharing common code (a feature Google calls "Trichrome"), even though they are separate downloads, so perhaps there is a way for GeckoView apps to share one GeckoView in the future.

https://www.xda-developers.com/google-chrome-no-longer-webvi...

> Firefox Focus on Android is quite a large app (132MB installed on my phone), even though on my phone, it uses either Chrome or WebView (bundled Gecko is disabled).

Some Firefox Focus users were still getting WebView as part of an A/B test comparing GeckoView to WebView. As of the latest release (Focus 8.0.23), everyone should be getting GeckoView.

The Firefox Focus APK (with GeckoView) download size is about 38MB, but the uncompressed footprint is larger.


>As of the latest release (Focus 8.0.23), everyone should be getting GeckoView.

Oh you're right.


But GeckoView still uses Gecko, it's not like a new engine which built from scratch. It's like a wrapper of Gecko, which removes a bunch of things from Gecko.


> which removes a bunch of things from Gecko.

Not exactly; GeckoView is a clean interface for embedding Gecko in Android applications.


GeckoView is a wrapper around Gecko to make it easy to embed it into applications. I heard it's API is similar to WebView, but it's not a complete drop-in replacement.


Thank you. I wish that was made clear in the article




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: