Recently I found an interesting thing is that Flash still works on firefox android 4.4 and there actually an firefox view(geckoView) that we can replace the webview. I followed the demo here and Orfox here Basically, I can build the app which uses geckoview to render flash content on Android 4.1 but not 4.4 (Kitkat).
On Kikat it says
Please install or enable Adobe Flash Player to view this content
There is a preference in firefox
PrefsHelper.setPref("plugin.disable", false);
this will toggle the flash plugin in firefox but that preference doesnt when I put it in Orfox.
I want to know which preference to enable flash on Geckoview? Or in general how to enable flash on geckoview android 4.4
I know flash is almost dead due to its poorly performance and support on mobile but there are still plenty of video contents are still in flash and we want to have flash support on our app
Some snippets and images in case you want to see
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
mGeckoView = (GeckoView) findViewById(R.id.gecko_view);
mGeckoView.setChromeDelegate(new MyGeckoViewChrome());
mGeckoView.setContentDelegate(new MyGeckoViewContent());
}
private class MyGeckoViewChrome extends GeckoViewChrome {
@Override
public void onReady(GeckoView view) {
PrefsHelper.setPref("javascript.enabled", true);
mGeckoView.addBrowser("http://www.dhs.state.il.us/accessibility/tests/flash/video.html");
}
}
Update 1:
After a day of digging into Firefox android source code, I think the question now is more like "How can we enabble plugin in GeckoView". I try to access "about:plugins
" I see Flash hasnt been added while it has in 4.1 and Firefox(4.4). There is a method in GeckoAppShell
thats locate flash library libflashplayer.so
and it can actually find the lib. Not sure why it cant be loaded