All Projects → VeiZhang → Downloader

VeiZhang / Downloader

Licence: other
Android多任务单线程断点文件下载器

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Downloader

DownloadManagerPlus
Using faster and easier than Android Download Manager
Stars: ✭ 80 (+175.86%)
Mutual labels:  downloader, android-download-manager
anime-scraper
[partially working] Scrape and add anime episode stream URLs to uGet (Linux) or IDM (Windows) ~ Python3
Stars: ✭ 21 (-27.59%)
Mutual labels:  downloader
xldl
迅雷下载引擎SDK Go语言版
Stars: ✭ 24 (-17.24%)
Mutual labels:  downloader
EazyLoader
EazyLoader is Flask based web-application built to make downloading easy for you. Download videos and pictures from YouTube and Instagram in the best available quality. You can also download slides from SlideShare in PDF or PPTX format. In addition to that, you can calculate duration of YouTube Playlist at different speeds. You can also encrypt …
Stars: ✭ 42 (+44.83%)
Mutual labels:  downloader
peerstohttp
Simple torrent proxy to http stream controlled over REST-like api
Stars: ✭ 30 (+3.45%)
Mutual labels:  downloader
twist-dl
Simple Twist.moe/AnimeTwist anime downloader in CLI with support for batch downloading.
Stars: ✭ 28 (-3.45%)
Mutual labels:  downloader
redvid
Smart downloader for Reddit hosted videos
Stars: ✭ 83 (+186.21%)
Mutual labels:  downloader
ee.Yrewind
Can rewind and save YouTube live stream
Stars: ✭ 133 (+358.62%)
Mutual labels:  downloader
aria2lib
A small library that is capable to run an aria2 executable without UI
Stars: ✭ 22 (-24.14%)
Mutual labels:  downloader
fa5pro-downloader
A tool that allows you to download Font Awesome 5 Pro for free
Stars: ✭ 34 (+17.24%)
Mutual labels:  downloader
eodag
Earth Observation Data Access Gateway
Stars: ✭ 183 (+531.03%)
Mutual labels:  downloader
KGrabber
Userscript for extracting links from kissanime.ru and similar sites.
Stars: ✭ 29 (+0%)
Mutual labels:  downloader
manhuagui-dlr
Python made manhuagui downloader, almost afk, browser/JS free, supports proxy and proxy pool.
Stars: ✭ 23 (-20.69%)
Mutual labels:  downloader
MiXLab
MiXLab is a mix of multiple amazing Colab Notebooks found on the internet such as rcloneLab, RLabClone, Torrent to Google Drive Downloader and some more.
Stars: ✭ 143 (+393.1%)
Mutual labels:  downloader
http-downloader
A download tool that is baked for the GitHub release assets. 专注于 GitHub 项目的工具安装
Stars: ✭ 18 (-37.93%)
Mutual labels:  downloader
Zoom2Youtube
Transfer video recordings from the Zoom to YouTube
Stars: ✭ 63 (+117.24%)
Mutual labels:  downloader
tinydownloader
a tiny downloader with console panel.
Stars: ✭ 80 (+175.86%)
Mutual labels:  downloader
VandaDownloader
强大的下载特性支持,更加清晰的特性设计。
Stars: ✭ 25 (-13.79%)
Mutual labels:  downloader
acd
ACD helps you download Adobe Connect Sessions Videos and Audios, download files from FTP server, transfer files using Shift I/O
Stars: ✭ 117 (+303.45%)
Mutual labels:  downloader
m3u8Downloader
meijuba.net,Python crawler,M3U8格式视频下载,桌面应用
Stars: ✭ 53 (+82.76%)
Mutual labels:  downloader

Downloader 文件下载器

DownloaderLibrary

Download

  • HttpURLConnection下载文件依赖库,实现多任务单线程断点下载
  • 临时文件的下载长度作为断点标记

权限

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

导入Android Studio

添加jCenter远程依赖到module里的build.gradle:

dependencies {
    compile 'com.excellence:downloader:_latestVersion'
  }

或者直接添加本地Library依赖

compile project(':DownloaderLibrary')

使用示例

  • 初始化

    // 默认下载选项:任务数2,单任务单线程下载
    Downloader.init(Context context)
    // 设置下载选项
    Downloader.init(Context context, DownloadOptions options)
  • 结束任务

    // 暂停所有下载任务,使用文件长度保存断点
    Downloader.destroy();
  • 监听两种方式

    推荐使用注解方式监听

    • 注解监听

      // 注册
      Downloader.register(this);
      
      // 解绑
      Downloader.unregister(this);
      
      // 监听
      @Download.onPreExecute
      public void onPre(DownloadTask task)
      {
          /**
           * 注解不添加URL,则获取全部任务的下载监听;
           * 加了URL,则过滤出对应的任务的下载监听
           * 如:@Download.onPreExecute({QQ_URL, ANGRYBIRDS_URL})
           */
      }
      
      @Download.onProgressChange
      public void onProgressChange(DownloadTask task)
      {
          /**
           * @see #onPre(DownloadTask)
           */
      }
      
      @Download.onProgressSpeedChange
      public void onProgressSpeedChange(DownloadTask task)
      {
          /**
           * @see #onPre(DownloadTask)
           */
      }
      
      @Download.onCancel
      public void onCancel(DownloadTask task)
      {
          /**
           * @see #onPre(DownloadTask)
           */
      }
      
      @Download.onError
      public void onError(DownloadTask task)
      {
          /**
           * @see #onPre(DownloadTask)
           */
      }
      
      @Download.onSuccess
      public void onSuccess(DownloadTask task)
      {
          /**
           * @see #onPre(DownloadTask)
           */
      }
    • 添加下载任务,并开始下载

      // 文件路径,下载链接,监听接口可以使用IListener接口,也可以使用Listener监听部分回调
      Downloader.addTask(File file, String DownloadURL, new IListener()
      {
      
          @Override
          public void onPreExecute(long fileSize)
          {
      
          }
      
          @Override
          public void onProgressChange(long fileSize, long downloadedSize)
          {
      
          }
      
          @Override
          public void onProgressChange(long fileSize, long downloadedSize, long speed)
          {
      
          }
      
          @Override
          public void onCancel()
          {
      
          }
      
          @Override
          public void onError(DownloadError error)
          {
      
          }
      
          @Override
          public void onSuccess()
          {
      
          }
      
      }));
  • 暂停下载任务

    DownloadTask.pause();
  • 恢复下载任务

    DownloadTask.resume();
  • 删除下载任务

    DownloadTask.discard();

修改日志

版本 描述
1.2.0 提升下载速度,增加设置项 2018-7-4
1.1.0 注解监听任务 2017-9-13
1.0.0 多任务单线程下载,临时下载文件长度保存断点记录 2017-8-11

注意事项

动态申请权限,可以参考permission

  • 1.1.0以前的版本,添加了限制:必须在Activity中初始化,原因是Android6.0+需要动态申请权限
  • 1.1.0以前的版本,没有适配畸形国产机的权限(使用原生方法不能申请权限成功),需自己实现
  • 1.1.0以后的版本,去掉在Activity初始化的限制,但是畸形国产机权限(使用原生方法不能申请权限成功) 和Android6.0+需要自己实现动态申请文件读写权限,否则会导致下载失败
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].