Android WebView: use firefox/gecko browser engine on Lineage OS
Asked Answered
P

2

6

On Lineage OS (and maybe on any Android?), it is possible to change the default WebView render (which is set by default to AOSP Browser, the default android browser without GAPPS). When I install Chrome (even without GAPPS installed), I can change this default to Chrome in the Setting/Development (which is practical in my case as the default browser has some annoying bugs).

Is it possible to also use Firefox's engine instead of Browser/Chrome (I don't want to have chrome installed and rely on proprietary software)? Installing Firefox (Fennec on FDroid) is not enough.

Thanks!

Permission answered 20/8, 2019 at 18:28 Comment(1)
also in lineage developers options there is a setting that I do not understand. the next one "Webview Simultaneous Processing" "Run WebView renderer separately" : I never understanded what this setting is for, but I noticed that if I turn it off, and I uninstall the webview, the webview keeps working on my phone. As if it whould be there. A example is the app Etar, or the Email program K-9. If I turn off the "Run WebView renderer separately" and after this uninstall the webview App and the HTML renderer thesse two apps continue to render html content.Xiphoid
I
3

This is not possible because GeckoView does not implement the WebView API according to one of the authors.

https://github.com/mozilla/geckoview/issues/167#issuecomment-902022285

Insomnolence answered 25/8, 2021 at 9:57 Comment(3)
Thanks. As I understand, this is even a legal issue?Permission
@Permission That would be the most ironic legal issue in history. Google to Oracle for more than a decade with 8 billion dollars in damages being claimed: "no no, you see, APIs can't be copyrighted, we can just take the Java language and do what we please!" and then turn around and tell Mozilla: "How could you do this to us, make an implementation for our WebView API‽"Insomnolence
However, they can restrict what you can ship as a vendor. "Oh you want the Googly maps and the Youtube? Hah, thou shallt not give the user access to their system by default nor ship with any WebView other than Chrome! Let it be so!" and somehow it is not an antitrust issue to use this dominance in web applications to enforce which software their users can install on their devices `\_(:|)_/`Insomnolence
O
2

Besides the common Chrome WebView, there's also Mozilla GeckoView.

The quick start shows how it can be added - and there's also an example app.

The down-side is, that geckoview-70.0.20191022130254.aar has 149.8 MB.

This would be it's API documentation and it's home on GitHub.

Overbearing answered 23/10, 2019 at 23:19 Comment(5)
Thanks for the answer. But if I understand GeckoView correctly, it is made to create new apps, not to replace the default WebView used by all android apps.Permission
Of course this has more overhead, because there is no system/library WebKit engine used, but it is generally what you were asking for. With Chrome WebView, there is a package installed, but GeckoView needs that library dependency instead. The API docs clearly show what it is ...Overbearing
So when the GeckView is availible as simple View, why can't you implement a WebView as a GeckoView?Isochronous
@FiliusPatris org.mozilla.geckoview.GeckoView can be used instead of android.webkit.WebView. The one has nothing to do with the other.Overbearing
@MartinZeitler so why hasn't sombody extended WebView and delegated the implementation to GeckoView? Where is the problem?Isochronous

© 2022 - 2024 — McMap. All rights reserved.