Added network security config to allow cleartext in webview

pull/72/head
M66B 6 years ago
parent 08a1571958
commit 85bdf38fe7

@ -15,6 +15,7 @@
android:appCategory="productivity"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppThemeLight">

@ -52,7 +52,7 @@ public class FragmentWebView extends FragmentEx {
settings.setJavaScriptEnabled(true);
settings.setLoadWithOverviewMode(true);
settings.setUseWideViewPort(true);
//settings.setBuiltInZoomControls(true);
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
webview.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<!-- https://developer.android.com/training/articles/security-config -->
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>
Loading…
Cancel
Save