Android - Marshmallow - Webview Library

Does anyone know of a solid webview library that implements the Marshmallow runtime resolution model? It is necessary to support camera access.

I found these examples: https://github.com/GoogleChrome/chromium-webview-samples , but they are over 2 years old and have not implemented a runtime resolution model.

So, I found various libraries like: https://github.com/teegarcs/Runtime_Permissions/blob/master/app/src/main/java/com/captech/runtime/MainActivity.java that implement the runtime model, but not use web browsing.

+7
android webview
source share
3 answers

Okay, so I had to jump from this rabbit hole and encode it myself. I will post this to github as a public (open source) repo over the next few days when I work in the best webview api (XWalk). But now, here is a working code for web browsing that asks for runtime for camera or gallery access based on a parameter selected by the user.

https://gist.github.com/digitalprecision/735820df14f696fc2c6c8b251b2b05d6

+2
source share

Using Crosswalk Project for Android

Using WebChromeClient, you can check your resolution if the application needs camera access.

webView= (WebView)findViewById(R.id.main_webView); webView.setWebChromeClient(webChromeClient); WebChromeClient webChromeClient = new WebChromeClient() { @Override public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) { //Check permission here return true; } }; 
0
source share

Have you tried cordova ? This is the top of android's own web browser. It has access to most hardware / cameras with a permission model.

https://www.npmjs.com/package/cordova-plugin-android-permissions https://issues.apache.org/jira/browse/CB-10120

0
source share

All Articles