Search code examples
androidandroid-download-manager

Download Manager 4.4 size limit?


My app uses the download manager to download a file. On Android 4.4.2 if I start a download that is over 100mb, the download fails and reports that there is insufficient space. If I start the same download via a web browser, the download will run.

downloadManager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
DownloadManager.Request request;
String requestString = "https://download_url";
                                request = new DownloadManager.Request(Uri.parse(requestString));
album.downloadManagerId = downloadManager.enqueue(request);

This is the code I use to start a download.

4.4.2 is the minimum version my app is supporting. If I try the download on a higher version of Android, it works fine.

The download should begin and complete because my device has plenty of free room.

Wifi/CEllular doesn't make a difference. SD card, no sd card doesn't make a difference.


Solution

  • It seems like the default download location on this version of Android is a small partition. I had to set the location to the external download folder (if available) to avoid this issue.

    On other versions, my app just ignores this and downloads to the default location.