Android下载管理器不从https下载文件

时间:2015-01-27 09:51:13

标签: android ssl android-download-manager

在我的Android应用中,我从亚马逊服务CloudFront下载媒体文件。

示例链接:https://testcdn.grouvi.org/uploads/94498583-94c4-44b8-911e-2e0c6bcc4b27/86e55069-2627-4c96-9cbe-98fc87f2eb1b.jpg

这是我的代码:

DownloadManager downloadManager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
DownloadManager.Request request = new DownloadManager.Request(uri);
downloadManager.enqueue(request);

在Android Kitkat的某些手机上我收到此错误

W/DownloadManager﹕ Aborting request for download 840: while trying to execute request: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x752a9a60: Failure in SSL library, usually a protocol error
    error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x7362ad74:0x00000000)

我有什么方法可以克服Android DownloadManager中的SSL握手失败?

0 个答案:

没有答案