Webview 屏幕不显示任何内容
Webview screen shows nothing
我有一个话题。
我的 ionic 应用程序中有一个 webview,它适用于我理解的所有使用 https 的页面。但是当我使用 link: https://portal.argos.com.do/ 时,因为屏幕变黑了,什么也没说。当我将它用作 _self 时会发生这种情况。有人知道为什么吗?
代码:
openurl(url: string) {
const options: InAppBrowserOptions = {
zoom: 'no'
};
const bro = this.browser.create(url, '_self', options);
}
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true"
android:versionCode="1" android:versionName="0.0.1"
package="io.ionic.starter"
xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true"
android:usesCleartextTraffic="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:label="@string/activity_name"
android:launchMode="singleTop" android:name="MainActivity"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
发生的情况是该页面即使显示 https 也不是完全安全的,因为服务器现在使用的是 TLS 1.0 而不是更新的。您可以找到一些验证您的 SSL 证书的页面以防万一:
https://www.dondomain.com/products/ssl/tools/ssl-checker/
https://www.ssllabs.com/ssltest/analyze.html
那么解决方案就是忽略页面的 SSL。
另一种测试和深入了解的方法是(在我的例子中)使用 android studio 查看我的应用程序的模拟器日志并使用此代码忽略 SSL 并知道是什么原因造成的这里有:
所以在 ionic 中应该做的是忽略 SSL 并且页面会显示,但 play store 可能不允许,所以它应该创建一种方法让用户取消转到page 不确定是或否。
这里也是一样:
(android java)
我有一个话题。
我的 ionic 应用程序中有一个 webview,它适用于我理解的所有使用 https 的页面。但是当我使用 link: https://portal.argos.com.do/ 时,因为屏幕变黑了,什么也没说。当我将它用作 _self 时会发生这种情况。有人知道为什么吗?
代码:
openurl(url: string) {
const options: InAppBrowserOptions = {
zoom: 'no'
};
const bro = this.browser.create(url, '_self', options);
}
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true"
android:versionCode="1" android:versionName="0.0.1"
package="io.ionic.starter"
xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true"
android:usesCleartextTraffic="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:label="@string/activity_name"
android:launchMode="singleTop" android:name="MainActivity"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
发生的情况是该页面即使显示 https 也不是完全安全的,因为服务器现在使用的是 TLS 1.0 而不是更新的。您可以找到一些验证您的 SSL 证书的页面以防万一:
https://www.dondomain.com/products/ssl/tools/ssl-checker/
https://www.ssllabs.com/ssltest/analyze.html
那么解决方案就是忽略页面的 SSL。
另一种测试和深入了解的方法是(在我的例子中)使用 android studio 查看我的应用程序的模拟器日志并使用此代码忽略 SSL 并知道是什么原因造成的这里有:
所以在 ionic 中应该做的是忽略 SSL 并且页面会显示,但 play store 可能不允许,所以它应该创建一种方法让用户取消转到page 不确定是或否。
这里也是一样: