I've been working with file downloads on android for my app, and honestly, the storage part can get messy really quickly.
If you want to support different ways of saving files, you suddenly need to handle MediaStore, SAF, DocumentFile, Uri, filesystem paths, different Android versions, etc.
So I decided to publish my implementation, along with some other features, as a library.
There are other download libraries, but you often have to write a lot of extra code yourself for things like:
- Saving into a user-selected folder (SAF)
- Saving into MediaStore (Downloads / Images / Video)
- Automatic file name and MIME type
- Handling unique filenames correctly
- Proper file overwriting
- Downloading into a subfolder
- Restoring downloads after process death
- Clean notifications + foreground service built-in
- Handling unstable networks
- Managing multiple downloads properly
- etc
SimpleDownloader tries to handle all of that out of the box with a very simple API.
The goal was to make something we can just drop into an app and start downloading, while having the common advance stuff already handled.
SimpleDownloader:
https://github.com/jeetarc/SimpleDownloader
I just wanted to build something a little different, with an easy API but still with modern, advanced features.
How are you handling downloads currently? I will love to know what you'd like to see in SimpleDownloader, and if you want, you can also contribute to it.
submitted by /u/Jeetarc[link] [comments]