android-webview

Access camera functionality in Android webview?

流过昼夜 提交于 2020-08-09 07:13:28
问题 I'm building a Native-Android/WebView-App thats code is hosted on a remote server (in HTML and Javascript). The Web App has a function that launches the phone's camera via a HTML form, input request: <form action="#" method="post" enctype="multipart/form-data" > <input name="image" type="file" accept="image/*" capture/> </form> This feature works perfectly well in the standard Android web browser but not in the Native App WebView browser. I have enabled the following permissions in the Native

webview handshake failed

安稳与你 提交于 2020-08-07 20:09:48
问题 I cannot call post request (Https) using webview. In my logcat I find this [1031/175452:ERROR:ssl_client_socket_openssl.cc(905)] handshake failed; returned 0, SSL error code 5, net_error -107**** It's not working in android 4.3 回答1: Quick Fix: Ignore SSL certificate error. WebView webview = findViewById(R.id.webView_about_alc); webview.setWebViewClient(new WebViewClient() { @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { Toast

webview handshake failed

别等时光非礼了梦想. 提交于 2020-08-07 20:08:10
问题 I cannot call post request (Https) using webview. In my logcat I find this [1031/175452:ERROR:ssl_client_socket_openssl.cc(905)] handshake failed; returned 0, SSL error code 5, net_error -107**** It's not working in android 4.3 回答1: Quick Fix: Ignore SSL certificate error. WebView webview = findViewById(R.id.webView_about_alc); webview.setWebViewClient(new WebViewClient() { @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { Toast

webview handshake failed

拈花ヽ惹草 提交于 2020-08-07 20:07:49
问题 I cannot call post request (Https) using webview. In my logcat I find this [1031/175452:ERROR:ssl_client_socket_openssl.cc(905)] handshake failed; returned 0, SSL error code 5, net_error -107**** It's not working in android 4.3 回答1: Quick Fix: Ignore SSL certificate error. WebView webview = findViewById(R.id.webView_about_alc); webview.setWebViewClient(new WebViewClient() { @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { Toast

webview handshake failed

|▌冷眼眸甩不掉的悲伤 提交于 2020-08-07 20:07:09
问题 I cannot call post request (Https) using webview. In my logcat I find this [1031/175452:ERROR:ssl_client_socket_openssl.cc(905)] handshake failed; returned 0, SSL error code 5, net_error -107**** It's not working in android 4.3 回答1: Quick Fix: Ignore SSL certificate error. WebView webview = findViewById(R.id.webView_about_alc); webview.setWebViewClient(new WebViewClient() { @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { Toast

How to load URL with headers in WebView?

耗尽温柔 提交于 2020-08-07 06:48:11
问题 I want to load a URL in a WebView and add headers User-Agent and autoToken . I have tried to just have val map = HashMap<String, String>() and add it as webview.loadUrl(url, map) . The second try was to just override shouldInterceptRequest() . override fun shouldInterceptRequest(view: WebView?, request: WebResourceRequest): WebResourceResponse? { request.requestHeaders?.put(LegacyAuthInterceptor.HEADER_AUTH_TICKET, autoToken) request.requestHeaders?.put("User-Agent", userAgent) return super

How to clear all WebView stored information?

柔情痞子 提交于 2020-08-01 05:21:24
问题 I have an Android browser and I have the option to clear cache, storage, cookies, etc. The code looks like this: webView.clearCache(true); webView.clearFormData(); webView.clearHistory(); webView.clearSslPreferences(); CookieManager.getInstance().removeAllCookies(null); CookieManager.getInstance().flush(); And this seems to work on all my tests but when I go to google.com my old searches are still there. What am I not clearing? Thanks. 回答1: Found the solution: WebStorage.getInstance()

How to clear all WebView stored information?

吃可爱长大的小学妹 提交于 2020-08-01 05:20:08
问题 I have an Android browser and I have the option to clear cache, storage, cookies, etc. The code looks like this: webView.clearCache(true); webView.clearFormData(); webView.clearHistory(); webView.clearSslPreferences(); CookieManager.getInstance().removeAllCookies(null); CookieManager.getInstance().flush(); And this seems to work on all my tests but when I go to google.com my old searches are still there. What am I not clearing? Thanks. 回答1: Found the solution: WebStorage.getInstance()

Letting WebView on Android work with prefers-color-scheme: dark

穿精又带淫゛_ 提交于 2020-07-28 12:40:45
问题 I have an Android App that uses webview, and lately I'm trying to figure out how to add a dark theme by using the new @media (prefers-color-scheme: dark) CSS syntax. I have the correct CSS written on my page, and if I open it in Chrome with the dark mode of Chrome turning on, it works. I also have my AppTheme inheriting Theme.AppCompat.DayNight , and my app shows dark loading dialog etc. when I turn on dark mode for the entire OS on my device. Even the auto-complete options for the <input>

Not able to load wordpress post content fully in webview in wordpress app on API Level 29. But it works fine on API Level 26

我怕爱的太早我们不能终老 提交于 2020-07-23 07:22:11
问题 I'm developing WordPress app which fetches post from Wordpress site & loads it in webview. I'm using "WP REST API" (fetch post data in JSON) & retrofit library. In API 26 app is working fine WordPress post is loading fully after migrating to androidx API 29 post content is loading only 1-3 lines in some post & in another post 10 lines. what can be the cause for this?, Contents are not getting loaded fully. After migrating to androidX post were not getting loaded I was getting an error ERR