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.
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.
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.
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.
Cookie From API Service to WebViewThe WKWebsiteDataStore store cookies that can be accessed by all WKWebview .
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With