如何将Android下载管理器与https结合使用?

如何将Android下载管理器与https结合使用?,android,android-download-manager,Android,Android Download Manager,我可以使用DownloadManager下载HTTP请求,但我找不到关于如何将DownloadManager与HTTPS结合使用的任何文档/方法 public long downloadFile(String fileUrl, String filename, String description, String token) { Uri uri = Uri.parse(fileUrl); DownloadManager.Request request = new Downloa

我可以使用DownloadManager下载HTTP请求,但我找不到关于如何将DownloadManager与HTTPS结合使用的任何文档/方法

public long downloadFile(String fileUrl, String filename, String description, String token) {
    Uri uri = Uri.parse(fileUrl);
    DownloadManager.Request request = new DownloadManager.Request(uri);
    if (!TextUtils.isEmpty(filename))
        request.setTitle(filename);
    if (!TextUtils.isEmpty(description))
        request.setDescription(description);

    request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename);
    request.allowScanningByMediaScanner();
    request.setVisibleInDownloadsUi(true);
    request.addRequestHeader("authorization", token);
    request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
    return mDownloadManager.enqueue(request);
}

为什么您认为HTTP和HTTPS下载之间存在差异?因为我收到错误“找不到证书路径的信任锚。下载管理器”如果我通过HTTPS请求下载manager.look here
http://stackoverflow.com/questions/8106155/android-downloadmanager-and-ssl-https
-可能重复我看到了这一点,但没有可靠的答案是可能重复的