A reliable, flexible, fast and powerful download engine. Simple use case such as start and cancel, download queue or get state or task info. The advanced use case such as set max parallel running count, set remit database delay milliseconds or injection components. FileDownloader is multitask, multi thread (multi connection), breakpoint-resume, high-concurrency, simple to use, single/not single-process. From now on, FileDownloader supports the following components to be customized by yourself, Connection, OutputStream, Database, ConnectionCountAdapter, IdGenerator, and ForegroundServiceConfig. You can use okhttp as your connection component. If you don't want to use any database on FileDownloader(the database on FileDownloader is used for persistent tasks' breakpoint info) just use NoDatabaseImpl.java. You can validate it by just creating your own DownloadMgrInitialParams.InitCustomMaker and putting customized components to it, and "init" the FileDownloader with it.
Features
- Starting with Android 9.0 (API level 28), cleartext support is disabled by default
- For FileDownloader, only one interface pause covers both Pause and Stop actions
- The FileDownloadService runs on a separate process
- Automatically resumes breakpoint by last downloaded file if possible
- FileDownloader will stop task but retain download status in DB
- You can customize the FileDownloader Engine