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!

tobiasBora
  • 1,542
  • 14
  • 23
  • 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. –  Jun 19 '21 at 11:48

2 Answers2

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.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • 1
    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. – tobiasBora Oct 24 '19 at 12:28
  • 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 ... – Martin Zeitler Oct 24 '19 at 16:03
  • 1
    So when the `GeckView` is availible as simple `View`, why can't you implement a `WebView` as a `GeckoView`? – TobTobXX Oct 24 '19 at 16:39
  • @FiliusPatris [org.mozilla.geckoview.GeckoView](https://mozilla.github.io/geckoview/javadoc/mozilla-central/index.html) can be used instead of [android.webkit.WebView](https://developer.android.com/reference/android/webkit/WebView). The one has nothing to do with the other. – Martin Zeitler Oct 24 '19 at 21:55
  • @MartinZeitler so why hasn't sombody extended `WebView` and delegated the implementation to `GeckoView`? Where is the problem? – TobTobXX Oct 25 '19 at 17:32
2

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

Luc
  • 5,339
  • 2
  • 48
  • 48
  • Thanks. As I understand, this is even a legal issue? – tobiasBora Aug 25 '21 at 14:51
  • @tobiasBora 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‽*" – Luc Aug 26 '21 at 21:05
  • 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](https://forum.fairphone.com/t/fairphone-s-approach-to-root-on-the-fairphone-2/11893) nor ship with any WebView other than Chrome! Let it be so!" and somehow it is not an [antitrust issue](https://en.wikipedia.org/w/index.php?title=Competition_law&oldid=1029333464#Dominance_and_monopoly) to use this dominance in web applications to enforce which software their users can install on *their* devices \`\\_(:|)_/\` – Luc Aug 26 '21 at 21:16