Android SDK 30 WebView requires setAllowFileAccess(true) to view local files
-
wrote on 8 Nov 2021, 22:16 last edited by
Changing from SDK 29 to 30 results in an Access Denied error when viewing a local file with WebView.
The local files are created dynamically as required, they are not static assets.The solution is to call WebView.getSettings().setAllowFileAccess(true); on the Android webview as allowFileAccess is now false by default in SDK 30.
Does anyone know if this can be set without having to build my own version of QtAndroidWebView ? Even then I am not sure it is straight-forward as the setting may need to be applied after loading.
Alternately, is there a location where local files can be written that are readable by webView without this setting?
-
wrote on 23 Nov 2021, 11:00 last edited by Augustas
I'm also having the same issue, can't find a way to set WebView "AllowFileAccess" flag to true on Qt
-
I'm also having the same issue, can't find a way to set WebView "AllowFileAccess" flag to true on Qt