美文网首页
原生Android 9系统无法使用DownloadManager

原生Android 9系统无法使用DownloadManager

作者: Charein | 来源:发表于2019-12-03 09:00 被阅读0次

    原生的Android 9系统,在使用DownloadManager下载文件时,文件已经加入到下载队列里,但一直无法开始下载。原因是系统会检测网络是否连通(通过连接Google的服务器)

    通过修改连接的服务器可以解决此问题,下面在命令行界面执行以下命令:

    adb shell settings put system captive_portal_http_url http://captive.v2ex.co/generate_204
    adb shell settings put system captive_portal_https_url http://captive.v2ex.co/generate_204
    adb shell settings put system captive_portal_mode 1
    adb shell settings put system captive_portal_use_https 1
    

    用adb shell settings list system可以查看当前配置的值。

    相关文章

      网友评论

          本文标题:原生Android 9系统无法使用DownloadManager

          本文链接:https://www.haomeiwen.com/subject/sxnqgctx.html