12 ms·
GeckoView for Android
- soapdog 6y agoMozilla offers many Android components for those building browsers: https://mozac.org/components/ https://mozac.org/components/
- dindresto 6y agoIs there a similar set of components for desktop applications? I.e., as an alternative to electron.
- rapsey 6y agoWould there be any point other than being from mozilla?
- bugmen0t 6y agoFeature set is obviously very different.
- Jonnax 6y agoGecko is a different rendering engine.
- yjftsjthsd-h 6y agoWell, "from Mozilla" is a subset of the larger and more valuable "not Blink"/"not from Google", which is handy if you're worried about an adtech company owning the entire web ecosystem.
- vbsteven 6y agoThere is zserge/webview which is a component that wraps the native webview on a given desktop platform. I haven’t checked it in detail but I’m curious if building an electron-style app framework with this is possible. https://github.com/zserge/webview https://github.com/zserge/webview
- 764_OC 6y agoThe [Positron Discontinued](https://mykzilla.org/2017/03/08/positron-discontinued/ https://mykzilla.org/2017/03/08/positron-discontinued/) post describes why Mozilla gave up on building an electron alternative. I think those general comments apply to anyone trying to do the same.
- winter_blue 6y agoDang, that sucks. I noticed that he says "its principal feature was that it was Electron-compatible" about Positron. That's a lofty, and frankly, unnecessary goal. Maybe Positron could/should be revived, as a thing of its own, an independent Gecko-based app host, with its own API, distinct and separate from Electron. (I'm guessing the author of Positron was hoping to attract current Electron users by aiming to make a switch as easy and seamless as possible with a compatible API, and while that's valuable, it would be good to just have an incompatible Electron competitor to begin with.)
- g105b 6y agoI fully share your optimism. I've been trying to find a way to do it with no hope, but maybe with the success and segregation that GeckoView brings to Android, we might have more hope in the near future to get something similar for desktop.
- Tistron 6y agoI get that it's nice to know exactly which version something is running on, but something i have found myself wanting when writing a small cli-script for downloading youtube videos, is something like Deno allowing me to run somebody's script, or somebody else to run mine, without fear of it damaging my system. But then also with the rendering engine so it could be just "deno run http://host/myscript.ts http://host/myscript.ts --allow-net=googlevideo.net,youtube.com --allow-write=." but it allows me to render a more friendly UI. I wish somebody a lot more competent than me would make such a tool from gecko
- alexlarsson 6y agoAs the original author of GtkMozEmbed I'd like to say that this is way too little, way to late. Mozilla has historically been very much against anyone trying to use the engine in anything other than the firefox app. This is completely up to them of course, and it probably let them move firefox forward faster, due to not having to care about APIs. However, it also means that chrome completely took over the entire market with electron and similar things.
- mintplant 6y ago> As the original author of GtkMozEmbed I'd like to say that this is way too little, way to late. Mozilla has historically been very much against anyone trying to use the engine in anything other than the firefox app. This has been in the works since at least 2016. I believe conversations around improving the embedding story were happening before that, too.
- GeneralMaximus 6y agoI've always wondered why Mozilla doesn't make it easier to embed Gecko everywhere it possibly can. If Electron was built with Gecko, it would go a huge way towards preventing Chrome from becoming the de-facto way of accessing the Web. As you said, this is too little, too late. I'm a Firefox user, but Chrome has pretty much won the browser wars. The only thing preventing it from achieving complete market dominance is the existence of Mobile Safari.
- arghwhat 6y agoMostly because it is a lot of work and tends to lead to new and exciting compromises. This is for example why Chrome decided to fork WebKit. (I do believe that people messed around with Electron drop-in replacements, but it's probably hard to sell if it doesn't bring anything new to the table.)
- alexlarsson 6y agoIt is expensive, but also it is a competitive advantage (of sorts), as we can see with electron. At the end of the day its just a strategic decision Mozilla made to focus on the application itself.
- londons_explore 6y agoI hope they have a very good story around patches and updates... Web browsers need patching pretty much every week, and having every app developer needing to re-release their app every time isn't practical. The alternative is a world where my phone can be compromised because an ad rendered in an app using a 3 week old build of gecko had a browser exploit in.
- tehlike 6y agoThis. Webview is a separate app on Android phones for quite a while now(and also I think chrome mobile is another/newer webview provider), which allows for much faster updates. As much as app developers hate not knowing what version of library is actually running in their apps, it is a net win for the user.
- folli 6y agoI didn't know about using chrome mobile as webview provider. What are the dis-/advantages of using it? Any experience?
- matharmin 6y agoAdvantage is that most of the time, you have a fairly new browser engine available for your app, that is not tied to the OS version (especially important on Android). Also doesn't require embedding an 50MB engine (Crosswalk) in your app. Disadvantage is that as an app developer you're not guaranteed to have any specific version available. Some devices never upgrade the pre-installed version automatically. The user is also able to switch between the Chrome webview and an OS webview on some devices (in developer settings, so it's not common). You can add checks in your app and direct the user to the update links, but requires quite a bit of work to do well.
- kalleboo 6y agoI'm curious, does the Android WebView also sandbox the browser process separately from the app's data like WKWebView does on iOS? If it does and GeckoView doesn't, that would be quite a big downside.
- OJFord 6y agoDoes this mean a user might open a link and get either WebView or GeckoView, according to what the application developer chose, or that the user can choose which all in-app links open in (if *View enabled in that app, etc.)?
- tehlike 6y agoApp developer chooses either this or that. However, I bet noone would choose gecko because it adds to the APK size.
- OJFord 6y agoHm I thought that's what it was, a shame. IMO 'WebViewHandler's should be distributed with browsers, and then when you choose a default browser you've also chosen a default 'WebViewHandler'.
- tehlike 6y agoIt's kind of possible to do that, but I don't know the specifics. Like you can select chrome provided webview or system provided webview. However, looks like gecko is explicitly not providing API compatibility, so looks like a no go from start.
- iggldiggl 6y agoHaving looked it up at some point, as far as I can remember the list of permitted Webview providers is hardcoded to the official webview package and the various branches of Chrome (Release/Dev/Canary and whatnot). So you can only use an independent Webview if you're also building your own ROM at the same time, and then you still need to reimplement the whole exisiting Webview API, which could be rather fun if parts of it turn out to depend on Blink-peculiarities that cannot be easily replicated in Gecko. And finally (and this applies to a standalone GeckoView package without direct API compatibility as well), end users being able to update the Webview independently from the apps using that Webview package means that you're suddenly operating under much more severe backwards compatibility constraints.
- fabiospampinato 6y ago> Like Firefox, GeckoView offers excellent support for modern Web standards. I guess it depends on one's definition of "excellent", but I'm still waiting on ES2018's regex lookbehind assertions to be implemented.
- jraph 6y agoWhat about support for CSS list-style-type: '-'? Happy to discover that it is finally supported since Chrome 79, released on the December 10, 2019. Supported on Firefox since version 39, released on July 2, 2015. And what about Flex-box's safe value for the justify-content property, allowing to justify (center) an element, but still be sure that the left side of the content will not be hidden if the parent container is too small? Right, supported on Firefox since version 63 released on October 23, 2018 and still not supported on Chrome (and to add insult to injury, safe is recognized, it just does nothing, which is worse than really not supporting the feature). I didn't look for these missing features on purpose, I have been annoyed by them recently or less recently. So as for Chrome's excellent support for modern Web standard, I guess it depends on one's definition of "excellent". Or more accurately, you can find lacking support for some features of the Web standard in any browser engine. :-)
- fabiospampinato 6y agoI do agree with you, but also I don't think that when judging whether Firefox's support of web standards is "excellent" it matters one bit what other browsers are doing. Like excellence isn't a relative measure here.
- jraph 6y agoOh, well, it literally depends on what you pick as a definition for "excellent" in a way I hadn't considered then :-) Food for thought however: what is implemented elsewhere may be an indicator of was level of excellence is achievable.
- fabiospampinato 6y ago
- thefounder 6y agoAnyone knows if you can bypass/disable CORS restrictions like in Electron ?
- eamsen 6y agoRelevant question with answers: https://stackoverflow.com/questions/61375629/allow-cross-origin-request-in-geckoview-for-android https://stackoverflow.com/questions/61375629/allow-cross-ori...
- anticensor 6y agoThe billion dollar (figuratively) question: When will GeckoView for jailbroken iOS come?
- floatingatoll 6y agoJailbroken iOS is not a billion dollar question, and is probably not a million dollar question either, given how small of a userbase it is.
- kbrosnan 6y agoGeckoView is fairly tightly focused on Java/Kotlin API. While work in the past allowed Gecko to run on iOS [1] this was not maintained. [1] https://imgur.com/r8Qti https://imgur.com/r8Qti and https://bugzilla.mozilla.org/show_bug.cgi?id=1163827 https://bugzilla.mozilla.org/show_bug.cgi?id=1163827
- ufo 6y agoOut of curiosity... does anyone know how big this library is in terms of installation size?
- huksley 6y agoI was also interested in this. Not sure how it will look in final APK build, but AAR is 28Mb https://maven.mozilla.org/maven2/?prefix=maven2/org/mozilla/geckoview/geckoview-arm64-v8a/64.0.20181204213330/ https://maven.mozilla.org/maven2/?prefix=maven2/org/mozilla/...
- AbuAssar 6y agoI'm looking forward to be able to embed GeckoView in my Ionic apps to support older android versions, as a replacement for the now defunct crosswalk project.
- sdlkfgj 6y agoMozilla is going on the completely opposite direction of what their supporters (and previous contributors) want them to go. Yes, they provide mobile browsers, plus a browser with "private mode" (focus) and now this. But on every single one of them, you have the same philosophy of Google Chrome (tm) adopted, of treating the user as a dumb gullible person that should not have access to important settings. Why would they waste so much effort, and clone all the things people should avoid from Google Chrome?! For example, any new tech introduced that can be used for browser fingerprinting and user tracking (e.g. canvas, webgl, webrtc, etc) is enabled to every single site by default, just like chrome. Some you can install extensions (you can't on this and on mozilla focus), some you can fiddle with user-UNfriendly settings in about:config (desktop and full featured android, not focus or this) where you have to guess setting names and cryptic values (what does 2 means in a setting named somethingEnabled?!) Only on mozilla desktop you can standardize sane settings by importing a user.js file from the dozen of crowdsourced efforts (i recommend the most complete one from https://github.com/pyllyukko/user.js/ https://github.com/pyllyukko/user.js/ ). think about this, there's more then a dozen community led effort to provide sane defaults, not hardcore user optimized settings, sane defaults, for a project that should be open source and the users could have been able to send in patches to have sane defaults in the first place! now, why would those sane defaults everyone want would be denied in the main branch? because mozilla do not represent the users for a long time! Mozilla is now a corporation that looks for Advertisement companies grants.
- eamsen 6y ago> For example, any new tech introduced that can be used for browser fingerprinting and user tracking (e.g. canvas, webgl, webrtc, etc) is enabled to every single site by default, just like chrome. GeckoView exposes a wide range of privacy (including anti-tracking and anti-fingerprinting) features in a (hopefully) comprehensive API, see https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/ContentBlocking.html https://mozilla.github.io/geckoview/javadoc/mozilla-central/..., and continues expanding its privacy settings. > Some you can install extensions (you can't on this and on mozilla focus)... GeckoView also exposes a WebExtension API, see https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/WebExtension.html https://mozilla.github.io/geckoview/javadoc/mozilla-central/..., and continues to expand extension support. > ...some you can fiddle with user-UNfriendly settings in about:config... You seem to have answered one of your own questions here. I also have the impression that you might have not commented on the GeckoView library, but on some range of Mozilla products (you named Focus).
- akerro 6y agoWhy not servoView?
- cosmojg 6y agoProbably because Servo isn't anywhere close to ready yet, unfortunately. It's really cool tech, and I'm dying to use it.
- bzb3 6y agoI have a gut feeling that by the time servo is ready, Firefox will have died. That, or servo will never be ready.
- noisem4ker 6y agoServo may not ever be ready by design, as it is a research project and not meant to stand on its own. The way it's useful is that parts of it occasionally get integrated into regular Gecko as they mature.
- agi0 6y agoThe plan for Servo is to integrate it in Gecko piece by piece. In this sense GeckoView (which uses Gecko) will use Servo eventually. It already has WebRender and Stylo from Servo (like the rest of Gecko-powered products).
- deleted 6y ago[deleted]
- poutine 6y agoGeckoView is awesome. We switched to using it with TelemetryTV (a next gen digital signage platform) and it's made our Android app a lot more compatible. The core of our player application is a Progressive Web Application that runs everywhere and just needs a native container like Electron or a Webview to run. Our customers run on whatever hardware they want(Windows, Mac, ChromeOS, etc)and Android is a really compelling platform since there's a ton of inexpensive AndroidTV devices out there but quality is all over the place. If you depended on the system provided Webview on AndroidTV you may get anything from version 50 to 80 of Chrome due to fragmentation of the platform and poor update habits of some manufacturers. Our app uses features like CSS grid and doesn't run on a large fraction of Webviews out there in the wild. The system Webview also doesn't provide much control at all for customizing the browser engine. GeckoView lets you do pretty much anything allow us to support important features we provide with our Electron clients. You also don't need to worry about a browser update causing trouble as you control when you update the browser engine. It's a shame that iOS doesn't have something similar because it's a really horrible platform due to Apples Webview for use cases like ours.
- AbuAssar 6y agoI really need to do the same for my ionic app. would you please write a blog post detailing how did you achieve this? Or better provide a github repo as an example thanks
- poutine 6y agoSorry, dont really know much about Ionic. The GeckoView site should have all you need to implement it instead of a Webview, it's pretty straight-forward.
- preston_mil 6y ago>You also don't need to worry about a browser update causing trouble as you control when you update the browser engine. This concerns me. Under the current google model, as long as you have a play store compatible device, you get chrome webview updates through the play store, even if the device fw is eol. If an app developer doesn't update their app, then you can have potentially vulnerable version of geckoview lying around. I hope a decoupling/webview-style update mechanism is eventually implemented, although I don't know how feasible that is (i'm an amateur android dev) That said, I really do like the project. And, I use firefox as my personal browser, both on principle and because it's quality software.
- amelius 6y agoIs this a "shared library" in the sense that when I have two applications using it, it is only installed once?
- eamsen 6y agoNo, there is no support for third-party shared libraries on Android yet.