lingochamp/FileDownloader ? reverse-engineered prompt
Reverse engineered prompt
Build me an Android file download library that can handle lots of downloads at once and keep going if the app is closed or the network drops.
I want it to support single file downloads and split downloads with multiple connections, so big files can download faster. It should be easy to start, pause, resume, and cancel tasks, and it needs to remember progress so downloads can continue from where they left off. Please include a simple demo app that shows a few common cases, like one download, several downloads at the same time, and resumed downloads.
Make sure it works both when the download service runs in a separate process and when it runs in the main process, and handle modern Android background limits with a foreground notification when needed. If there are sensible places to let me swap in my own network, database, or output stream logic, keep that flexible. If you need to check current Android docs or best practices online, feel free to do that.
Are you gonna build this?
make sure you review the code using coderabbit