DownloadManager downloading files over 2.1 GB

前端 未结 5 2394
青春惊慌失措
青春惊慌失措 2021-02-19 02:53

I am working on an app and one of the features I am working on is to download some binary files. Some of them are really big (more than several mega-bytes). Downloads are comple

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-19 03:47

    From looking at the Android source code, it appears that this issue was resolved in JB-MR2.

    It seems that the only way to work around this on older platform versions would be to modify the server such that it uses chunked transfer encoding[1] for these large resources. In that case, that Download Manager will ignore and not attempt to parse the Content-Length header.

    [1] http://en.wikipedia.org/wiki/Chunked_transfer_encoding

提交回复
热议问题