Add multi-threaded file downloads to an Android app to speed up large file transfers
Resume interrupted downloads automatically after a network drop or device restart
Download multiple files simultaneously in the background from an Android service
Swap in OkHttp as the network layer for finer control over connections
On Android 8.0 and above, a visible notification is required when downloading while the app is in the background.
FileDownloader is a Java library for Android that manages downloading files in the background. It supports running multiple downloads at the same time, and each individual download can open several simultaneous connections to pull down different sections of a file in parallel, similar to how desktop download managers work. A key feature is breakpoint resumption: if a download stops partway through due to a network drop, device restart, or the app being killed, FileDownloader saves its progress and picks up from that exact point rather than starting over. For large files, this makes a meaningful practical difference. The project has a successor called OkDownload, also referred to as FileDownloader2, released by the same team. New features are now being directed to OkDownload rather than to FileDownloader. The original library still receives bug fixes but is otherwise in maintenance mode. The README notes that unit-test coverage on FileDownloader is low, which is part of why active development shifted. Integrating it into an Android project requires a single dependency line in a build configuration file. Developers can also swap out internal components with custom implementations: the networking layer, the file-writing mechanism, the database that stores download progress, and the logic that decides how many connections to open per file. A companion library makes it straightforward to use OkHttp as the underlying connection library if that is preferred. The library runs as a background service. Android 8.0 tightened restrictions on background services, so FileDownloader now shows a visible notification when downloading while the app is in the background, keeping it compliant with OS rules. Android 9.0 changed security defaults around plain HTTP traffic, and the library's demo application handles that case as well.
← lingochamp on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.