Skip to content

Commit

Permalink
upgrade version code(7->8) name(0.1.4 -> 0.1.5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacksgong committed Jan 17, 2016
1 parent 91c3a50 commit fc29952
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 25 deletions.
56 changes: 48 additions & 8 deletions CHANGELOG-ZH.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
# Change log

### Version 0.1.4
## Version 0.1.5

_2016-01-17_

#### 新接口

- `BaseDownloadTask#setTag(key:int, tag:Object)`: 用于存储任意的变量方便回调中使用,以key作为索引。
- `BaseDownloadTask#getTag(key:int)`: 根据key获取存储在task中的变量。
- `BaseDownloadTask#addHeader(name:String, value:String)`: 添加自定义的请求头参数,需要注意的是内部为了断点续传,在判断断点续传有效时会自动添加上(`If-Match``Range`参数),请勿重复添加导致400或其他错误。
- `BaseDownloadTask#addHeader(line:String)`: 添加自定义的请求头参数,需要注意的是内部为了断点续传,在判断断点续传有效时会自动添加上(`If-Match``Range`参数),请勿重复添加导致400或其他错误。
- `BaseDownloadTask#removeAllHeaders(name:String)`: 删除由自定义添加上去请求参数为`{name}`的所有键对。

#### 性能与提高

- 提高性能: 在未打开Log的情况下,屏蔽了所有Log生成的代码。
- 提高可调试性: 重新过滤所有的日志级别,减少高级别日志输出,并且默认将会打出`Warn``Error``Assert`级别的log以便于用户在未打开日志的情况下也可以定位到基本的组件异常。

#### 修复

- 修复在一些高并发的情况下,有可能内部队列存在残留任务的bug,此bug可能可能引发回调被旧的任务吞掉的问题。
- 修复了出现网络错误,或者其他错误,重新下载无法自动断点续传的bug。

#### 其他

- 所依赖的okhttp从`2.7.1`升到`3.0.1`

## Version 0.1.4

_2016-01-13_

#### 新接口

Expand All @@ -22,33 +50,45 @@
- 修复: 主动调用`FileDownloader#unBinderService`,没有释放连接相关资源的bug。
- 修复: ui进程被干掉,下载进程健还有活跃的并行任务正在下载,ui进程启动以后启动相同的队列列表,无法收到进度只收到warn的bug。

### Version 0.1.3
## Version 0.1.3

_2016-01-04_

- 不再受到1.99G限制;如果是大于1.99G的文件,请使用`FileDownloadLargeFileListener`作为监听器,使用对应的`getLargeFileSoFarBytes()``getLargeFileTotalBytes()`接口
- 性能优化: 部分接口跨进程通信不受binder thread 阻塞。
- 依赖okhttp,从2.7.0 升到2.7.1
- 依赖okhttp,`2.7.0`升到`2.7.1`

### Version 0.1.2
## Version 0.1.2

_2015-12-27_

- 优化线程消化能力
- 修复大队列任务暂停可能部分无效的问题
- 修复大队列并行下载时一定概率下载已经完成回调囤积延后回调的问题

### Version 0.1.1
## Version 0.1.1

_2015-12-25_

- event线程区分敏捷线程池与其他线程池,减少资源冗余强制、内部稳定性以及消化能力与性能,
- 添加自动重试接口,新增用户指定如果失败自动重试的次数

### Version 0.1.0
## Version 0.1.0

_2015-12-24_

- FileDownloadStatus 由`int`改为`byte`,该参数会频繁的在IPC时被拷贝
- 优化串行or并行任务时,筛选task在准备数据时就筛选好,减少冗余操作,更加安全
- 优化串行任务执行保证使用更可靠的方式

### Version 0.0.9
## Version 0.0.9

_2015-12-23_

- 将调用start(启动任务)抛独立线程处理,其中的线程是通过共享非下载进程EventPool中的线程池(可并行8个线程)

### Version 0.0.8
## Version 0.0.8

_2015-12-22_

- initial release
60 changes: 50 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,35 @@

> [中文迭代日志](https://github.com/lingochamp/FileDownloader/blob/master/CHANGELOG-ZH.md)
### Version 0.1.4
## Version 0.1.5

_2016-01-17_

#### New Interfaces

- `BaseDownloadTask#setTag(key:int, tag:Object)`: Set a tag associated with this task. If the key already existed, the old tag will be replaced.
- `BaseDownloadTask#getTag(key:int)`: Get the object stored in the task as a tag, or null if not set.
- `BaseDownloadTask#addHeader(name:String, values:String)`: Add custom request header to the task. Attention: We have already handled ETag, and will add `If-Match` & `Range` value if it works.
- `BaseDownloadTask#addHeader(line:String)`: Add custom request header to the task. Attention: We have already handled ETag, and will add `If-Match` & `Range` value if it works.
- `BaseDownloadTask#removeAllHeaders(name:String)`: Remove all custom request header bind with the `{name}`.

#### Enhancement

- Improve Performance: Reduce the consumption of the generated log.
- Improve Debugging: To filter all the log level, reduce the high level of log output, and by default, will output `Warn``Error``Assert` level of log in order to debugging in the case of the value of `FileDownloadLog.NEED_LOG` is false(default).

#### Fix

- Fix can't resume from the break point naturally in case of the download status of the task is Error.
- Fix the size of the queue may not match the number of actual active tasks in case of high concurrency. This bug may would caused some callbacks to be consumed by the old tasks.

#### Others

- Upgrade dependency okhttp from `2.7.1` to `3.0.1`.

## Version 0.1.4

_2016-01-13_

#### New Interfaces

Expand All @@ -15,43 +43,55 @@
- Supported [Chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) data download(Recommend to glance at demo on [Single Task Test](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/SingleTaskTestActivity.java)).
- Improve Performance: Reduce IPC.
- Improve Performance: Reduce lock.
- Improve Performance: Delete invalid datas in db with the `:filedownloader` progress start.
- Improve Performance: Delete invalid datum in db with the `:filedownloader` progress start.
- Improve Performance: Ignore the `callbackProgressTimes` column in db.

#### Fix

- Fix `FileDownloader#pauseAll` not effect in case of low memory and ui progress is Background Progress situation and the `:filedownloader` progress(Service Progress) alive and still have running tasks in the `filedownloader` progress but ui progress has died and relived.
- Fix not release connect resources when invoke `FileDownloader#unBinderService` manually.
- Handle case of ui progress be killed by sys and download progress not be killed, and ui progress relives and reexecutes same tasks queue.
- Handle case of ui progress be killed by sys and download progress not be killed, and ui progress relives and re-executes same tasks queue.


## Version 0.1.3

### Version 0.1.3
_2016-01-04_

- Enhancement: no longer subject to the upper bound of 1.99G, add `FileDownloadLargeFileListener`, `getLargeFileSoFarBytes()`,`getLargeFileTotalBytes()`.
- Performance optimization: some ipc transaction just need one-way call(async), not block(sync).
- Upgrade dependency okhttp from 2.7.0 to 2.7.1.
- Upgrade dependency okhttp from `2.7.0` to `2.7.1`.

### Version 0.1.2
## Version 0.1.2

_2015-12-27_

- Optimize thread digestion([map](https://github.com/lingochamp/FileDownloader/raw/master/art/filedownload_sample_description.png).
- Fix: may `pause()` invalid in large queue task.
- Fix: large queue task parallel download, may download has been completed but the callback

### Version 0.1.1
## Version 0.1.1

_2015-12-25_

- Optimization of internal performance, according to the time split thread pool.
- Add auto retry feature.

### Version 0.1.0
## Version 0.1.0

_2015-12-24_

- The `FileDownloadStatus` parameter type is changed from `int` to `byte`, which is frequently copied in IPC.
- Optimization of multi task queue filtering time.
- Optimizing serial task execution mechanism.

### Version 0.0.9
## Version 0.0.9

_2015-12-23_

- The start operation into independent thread processing, sharing thread pool in EventPool.

### Version 0.0.8
## Version 0.0.8

_2015-12-22_

- initial release
11 changes: 8 additions & 3 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Android 文件下载引擎,稳定、高效、简单易用

> [README DOC](https://github.com/lingochamp/FileDownloader/blob/master/README.md)
> 本引擎依赖okhttp 2.7.1
> 本引擎依赖okhttp 3.0.1
---
#### 版本迭代日志: [Change Log](https://github.com/lingochamp/FileDownloader/blob/master/CHANGELOG.md)
Expand Down Expand Up @@ -43,7 +43,7 @@ Android 文件下载引擎,稳定、高效、简单易用
在项目中引用:

```
compile 'com.liulishuo.filedownloader:library:0.1.4'
compile 'com.liulishuo.filedownloader:library:0.1.5'
```

#### 全局初始化在`Application.onCreate`
Expand Down Expand Up @@ -192,11 +192,15 @@ if(parallel){
| --- | ---
| setPath(path:String) | 下载文件的存储绝对路径
| setListener(listener:FileDownloadListener) | 设置监听,可以以相同监听组成队列
| setCallbackProgressTimes(times:int) | 设置progress最大回调次数
| setCallbackProgressTimes(times:int) | 设置FileDownloadListener#progress最大回调次数
| setTag(tag:Object) | 内部不会使用,在回调的时候用户自己使用
| setTag(key:int, tag:Object) | 用于存储任意的变量方便回调中使用,以key作为索引
| setForceReDownload(isForceReDownload:boolean) | 强制重新下载,将会忽略检测文件是否健在
| setFinishListener(listener:FinishListener) | 结束监听,仅包含结束(over(void))的监听
| setAutoRetryTimes(autoRetryTimes:int) | 当请求或下载或写文件过程中存在错误时,自动重试次数,默认为0次
| addHeader(name:String, value:String) | 添加自定义的请求头参数,需要注意的是内部为了断点续传,在判断断点续传有效时会自动添加上(`If-Match``Range`参数),请勿重复添加导致400或其他错误
| addHeader(line:String) | 添加自定义的请求头参数,需要注意的是内部为了断点续传,在判断断点续传有效时会自动添加上(`If-Match``Range`参数),请勿重复添加导致400或其他错误
| removeAllHeaders(name:String) | 删除由自定义添加上去请求参数为`{name}`的所有键对
| ready(void) | 用于队列下载的单任务的结束符(见上面:启动多任务下载的案例)
| start(void) | 启动下载任务
| pause(void) | 暂停下载任务(也可以理解为停止下载,但是在start的时候默认会断点续传)
Expand All @@ -212,6 +216,7 @@ if(parallel){
| getEx(void):Throwable | 获取下载过程抛出的Throwable
| isReusedOldFile(void):boolean | 判断是否是直接使用了旧文件(检测是有效文件),没有启动下载
| getTag(void):Object | 获取用户setTag进来的Object
| getTag(key:int):Object | 根据key获取存储在task中的变量
| isContinue(void):boolean | 是否成功断点续传
| getEtag(void):String | 获取当前下载获取到的ETag
| getAutoRetryTimes(void):int | 自动重试次数
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Android multi-task file download engine.

> [中文文档](https://github.com/lingochamp/FileDownloader/blob/master/README-zh.md)
> This project dependency on [square/okhttp 2.7.1](https://github.com/square/okhttp)
> This project dependency on [square/okhttp 3.0.1](https://github.com/square/okhttp)
## DEMO

Expand All @@ -24,7 +24,7 @@ FileDownloader is installed by adding the following dependency to your build.gra

```
dependencies {
compile 'com.liulishuo.filedownloader:library:0.1.4'
compile 'com.liulishuo.filedownloader:library:0.1.5'
}
```

Expand Down Expand Up @@ -190,9 +190,13 @@ if(parallel){
| setListener(listener:FileDownloadListener) | For callback download status(pending,connected,progress,blockComplete,retry,error,paused,completed,warn)
| setCallbackProgressTimes(times:int) | Set maximal callback times on callback `FileDownloadListener#progress`
| setTag(tag:Object) | Sets the tag associated with this task, not be used by internal
| setTag(key:int, tag:Object) | Sets a tag associated with this task. If the key already existed, the old tag will be replaced
| setForceReDownload(isForceReDownload:boolean) | If set to true, will not check whether the file is downloaded by past, default false
| setFinishListener(listener:FinishListener) | -
| setAutoRetryTimes(autoRetryTimes:int) | Set the number of times to automatically retry when encounter any error, default 0
| addHeader(name:String, values:String) | Add custom request header to the task. Attention: We have already handled ETag, and will add `If-Match` & `Range` value if it works
| addHeader(line:String) | Add custom request header to the task. Attention: We have already handled ETag, and will add `If-Match` & `Range` value if it works
| removeAllHeaders(name:String) | Remove all custom request header bind with the `{name}`
| ready(void) | Ready task( For queue task )
| start(void) | Start task
| pause(void) | Pause task
Expand All @@ -208,6 +212,7 @@ if(parallel){
| getEx(void):Throwable | Get throwable
| isReusedOldFile(void):boolean | Is reused downloaded old file
| getTag(void):Object | Get the task's tag
| getTag(key:int):Object | Get the object stored in the task as a tag, or null if not set.
| isContinue(void):boolean | Is resume by breakpoint
| getEtag(void):String | Get current ETag on header
| getAutoRetryTimes(void):int | Get the number of times to automatically retry
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_NAME=0.1.4
VERSION_CODE=7
VERSION_NAME=0.1.5
VERSION_CODE=8
BUILD_TOOLS_VERSION=23.0.1
COMPILE_SDK_VERSION=23

Expand Down

0 comments on commit fc29952

Please sign in to comment.