Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

file-downloader

> 编程语言
Open source

FileDownloader, powerful http/https file download tool on Android

386 stars0 likes1 views
WebsiteGitHub

About

FileDownloader, powerful http/https file download tool on Android

file-downloader

FileDownloader, a powerful http/https file download tool, I am to make downloading http/https file easily on Android.

中文说明文档

Features

  • Multi task at same time, Broken-point download, Auto retry, Support download large file bigger than 2G, Powerful to deal with exceptions, download files CRUD and so on.

Captures * *


Quick start

  • step 1. add in dependencies in your module's build.gradle
java
compile 'org.wlf:FileDownloader:0.3.2'

for eclipse users, jars here: FileDownloader-0.3.2.jar, FileDownloader-0.3.2-sources.jar

  • step 2. init FileDownloader in your application's onCreate()
…
  • step 3. register listeners

-register a DownloadStatusListener(may be at the time the fragment or activity's onCreate called, you can ignore this if your app do not care the download progress, if you want to use in android service, see Use FileDownloader in Service)

…

-register a DownloadFileChangeListener if you care any change of the download file in db

…

the difference between DownloadStatusListener and DownloadFileChangeListener is, DownloadStatusListener concerns the download progress, and DownloadFileChangeListener concerns the data change

  • step 4. start to download and operate the url files(the simple use of FileDownloader APIs)

-create a new download

java
FileDownloader.start(url);// start a new download if not download yet, or continue download if it start download before, it will auto Broken-point if the server supported

-or create a custom new download

…

-pause downloads

java
FileDownloader.pause(url);// pause single
FileDownloader.pause(urls);// pause multi
FileDownloader.pauseAll();// pause all

-continue a paused download

java
FileDownloader.start(url);// continue a paused download, it will auto Broken-point if the server supported

-move download files to new dir path

java
FileDownloader.move(url, newDirPath, mOnMoveDownloadFileListener);// move single file
FileDownloader.move(urls, newDirPath, mOnMoveDownloadFilesListener);// move multi files

-delete download files

java
FileDownloader.delete(url, true, mOnDeleteDownloadFileListener);// delete single file
FileDownloader.delete(urls, true, mOnDeleteDownloadFilesListener);// delete multi files

-rename a download file

java
FileDownloader.rename(url, newName, true, mOnRenameDownloadFileListener);
  • step 5. unregister listeners

-unregister the DownloadStatusListener(may be at the time the fragment or activity's onDestroy called)

java
FileDownloader.unregisterDownloadStatusListener(mOnFileDownloadStatusListener);

-unregister the DownloadFileChangeListener

java
FileDownloader.unregisterDownloadFileChangeListener(mOnDownloadFileChangeListener);

API docs


Version change log


Upgrade to latest version help

  • 0.2.X --> 0.3.X

-replace FileDownloader.detect(String, OnDetectUrlFileListener) with FileDownloader.detect(String, OnDetectBigUrlFileListener) for supporting large file bigger than 2G to detect recommended.

-replace DownloadFileInfo.getFileSize() with DownloadFileInfo.getFileSizeLong(), and also replace DownloadFileInfo.getDownloadedSize() with DownloadFileInfo.getDownloadedSizeLong() for supporting large file bigger than 2G to detect recommended.

-replace FileDownloader.registerDownloadStatusListener(OnFileDownloadStatusListener) with FileDownloader.registerDownloadStatusListener(OnSimpleFileDownloadStatusListener or OnRetryableFileDownloadStatusListener) for better experience.

-do not forget to do unregisterDownloadStatusListener(OnFileDownloadStatusListener) and unregisterDownloadFileChangeListener(OnDownloadFileChangeListener) if your registered then, because the listeners may cause memory overflow if you never unregister then.

-replace all FailReason classes started with On by those ones started with non-On, eg. OnFileDownloadStatusFailReason -->FileDownloadStatusFailReason.

  • 0.1.X --> 0.3.X

-replace class FileDownloadManager with new class FileDownloader, also replace all methods in the FileDownloadManager with new ones recommended.

-do steps in 0.2.X --> 0.3.X


Design of FileDownloader


Code Style, follow Google Android Code Style for Contributors, contributors are required to follow the rules


Supported system version: API 8 and above(Android 2.2+)


FAQ


LICENSE

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言