Alternatives for not using WebView

3

Are there any alternatives other than webview for android to use? I'm having a problem that, it seems, a lot of people have to run videos in the video tag of html5 .

Many people say the solution is simply to use the webchromeclient and the magic would happen without any effort, well, it does not work. It seems that in version 4.4+ of the android this component would become native and in the inferior ones we have that it directs it this way: webView.setWebChromeClient(new WebChromeClient());

I have done several tests and the result has been very frustrating. Despite the time that html5 is already in our midst, many mobile browsers can not implement much of the features or at least implement them well. What best performed the video functionality was Mozilla Firefox. Having this in mind, I researched how he did this and saw that he was using another android pro webview, which is geckoview .

Has anyone ever managed to use this geckoview? How did you do it?

    
asked by anonymous 04.07.2016 / 21:21

1 answer

3

crosswalk

As this answer there is a project called crosswalk (requires Android 4.0 +)

To install: link

Support:

WebRTC, WebGL, Vibration API, Presentation API and WebView updates

The difference is that it uses WebApps, here's how to create an application (which I think would already be your case):

link

GeckoView

To use GeckoView do the following:

  • Download geckoview_library.zip and geckoview_assets.zip at link

    / li>
  • Extract the content

  • Open Eclipse (if using Eclipse) and go to File > Import and the GeckoView lib project.

  • Set GeckoView in your project as a dependency, as it is in the image:

  • Copythefolderassetfromgeckoview_assets.ziptotheassetfolderofyourapp.

  • Addmanifestmerger.enabled=truetoyourprojectfileproject.properties,thefolderstructureshouldlooksomethinglike:

  • Gotothelayoutofyourfileandaddthefollowing:

    <org.mozilla.gecko.GeckoViewandroid:id="@+id/geckoview"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />
    
  • And within mainActivity add:

    GeckoView geckoView = (GeckoView) findViewById(R.id.geckoview);
    geckoView.add("http://pt.stackoverflow.com");
    

If you want a pre-made examples:

04.07.2016 / 22:12