Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Marshmallow - Webview Library [closed]

Anyone know of a solid webview library which implements the Marshmallow runtime permission model? Must support camera access.

I found these examples: https://github.com/GoogleChrome/chromium-webview-samples, but they are over 2 years old and do not implement the runtime permission model.

So then I found various libs like this: https://github.com/teegarcs/Runtime_Permissions/blob/master/app/src/main/java/com/captech/runtime/MainActivity.java which do implement the runtime model, but do not use webview.

like image 805
Mike Purcell Avatar asked Sep 21 '16 14:09

Mike Purcell


People also ask

Is Android WebView deprecated?

The Android system webview custom cache file has been deprecated and removed in Android 13. New apps and any app updates will now use the operating system default cache location.

What happens if I disable Android System WebView?

On other Android OS versions, web app performance may suffer without WebView enabled. Operating without WebView also may introduce a security risk because it disables Android's default security configuration for embedding web content in applications.

What can I use instead of WebView?

Alternatives to WebView If you want to send users to a mobile site, build a progressive web app (PWA). If you want to display third-party web content, send an intent to installed web browsers. If you want to avoid leaving your app to open the browser, or if you want to customize the browser's UI, use Custom Tabs.

Does WebView save cookies?

Cookie From API Service to WebViewThe WKWebsiteDataStore store cookies that can be accessed by all WKWebview .


1 Answers

Ok, so I had to jump down this rabbit hole and code it out myself. I will be submitting this to github as a public (open source) repo over the next few days as I work in a better webview api (XWalk). But for now, here is working code for a webview which asks for runtime perms for camera or gallery access based on user selected option.

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

like image 91
Mike Purcell Avatar answered Sep 22 '22 04:09

Mike Purcell