android - 在 Android 4.1 到 5.0 的 Cordova 应用程序上启用 TLS 1.2

标签 android cordova ssl ionic-framework

我有一个 android 应用程序在 android 4.1 到 5.0 上失败。问题是它连接到的 API 需要 TLS 1.2。

official docs说 TLS 1.2 受支持但默认情况下未启用。我一直没能找到用 cordova 启用它的方法;如何在 android/cordova 应用程序上启用 TLS 1.2?

看来必须为 webview 启用它,this answer说这是不可能的..有什么我可以做的吗?

最佳答案

@evandentremont,
缺少plugin (其中 2 个仅适用于 iOS),您的下一个最佳选择是设置 minSDK在你的config.xml

这篇文章证实了 API 级别 20,tls 1.2 is turned on by default ;安卓官方confirms this

Holly Schinsky 有 a description关于如何添加此功能和其他重要功能。

您需要添加的链接如下所示:
<preference name="android-minSdkVersion" value="20" />

祝你好运

关于android - 在 Android 4.1 到 5.0 的 Cordova 应用程序上启用 TLS 1.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33237183/

相关文章:

android - 如何在facebook SDK Android中获取用户的facebook个人资料图片

android - 类型不匹配 : inferred type is <no name provided> but Callback<Post! >!预计

ios - 是否可以更改已编译的 iOS 应用程序的图标?

android - HttpsUrlconnection 连接时接受任何证书

java - IBM 队列管理器连接失败并出现以下错误

java - 如何从url获取文本并将其放入textView中?

iOS:无法在AppBrowser中启动cordova -> "Warning: Attempt to present <inAppBrowser> on <MainViewController> while a presentation is in progress"

javascript - Angular Marked 和 Inappbrowser 在系统浏览器中打开所有链接

ssl - 在 Google Compute Engine 上创建 SSL 证书

android - 非全屏 Activity