7

Since the WebView implementation on Android depends on the Android version and the manufacturer (Samsung and other manufacturers apply their own patches to it), I'd like to provide my own rendering engine for my Android app to reduce QA overhead and gain more confidence.

I tinkered around with both the Chrome engine (Chromium) and the Firefox engine (GeckoView) and integrated them into my Android app. The GeckoView is very straight forward to integrate and so far it is working well. The only thing I am missing is a Javascript interface (bi-directional) similar to WebView's addJavascriptInterface.

Is there any way to get Javascript callbacks and to execute Javascript with GeckoView?

bluebamboo
  • 1,162
  • 9
  • 11
  • did you manage to fix this? – Hades Jul 20 '15 at 03:57
  • Not exactly a JavaScript interface, but GeckoView provides a method for injecting scripts and interacting with them via messages. [Here is a short post about it](http://permalink.gmane.org/gmane.comp.mozilla.devel.mobile/848). – Stan Jan 02 '16 at 18:26
  • 1
    Are there any new developments? – forDream May 12 '18 at 03:56
  • The https://github.com/mfinkle/geckobrowser sample that @Stan mentions no longer works - I'm using Dec. 14, 2018 nightly build of GeckoView, and methods like mGeckoView.setChromeDelegate() and mGeckoView.importScript() don't exist any more in it... Does anyone know how to do this? – gregko Dec 15 '18 at 22:20
  • Are there any new developments? – AndroidEduIO Aug 08 '19 at 22:51

0 Answers0