Skip to content

Commit 5523df6

Browse files
committed
upgrade version name(0.1.9->0.2.0) code(10->11)
1 parent b56a7cd commit 5523df6

File tree

6 files changed

+77
-14
lines changed

6 files changed

+77
-14
lines changed

CHANGELOG-ZH.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Change log
22

3+
## Version 0.2.0
4+
5+
_2016-02-15_
6+
7+
#### 新接口
8+
9+
- `filedownloader.properties-http.lenient`: 添加`http.lenient`用于配置下载引擎中是否需要忽略一些http规范性的错误(如: 忽略 `can't know the size of the download file, and its Transfer-Encoding is not Chunked`), 默认值`false`
10+
- `FileDownloadNotificationHelper`: 用于支持在通知栏中的通知对下载引擎中任务下载状态同步的快速集成。
11+
- `FileDownloader#init(Application,OkHttpClientCustomMaker)`: 用于为下载引擎提供定制的OkHttpClient。
12+
13+
#### 修复
14+
15+
- 修复: 需要重新启动的列表(`FileDownloadTask.NEED_RESTART_LIST`)不为空并且下载服务断开时出现`Concurrent Modification Exception`的异常。
16+
- 修复: 下载引擎连接丢失以后,重连任务的回调失效的bug。
17+
- 修复: 在一些高并发下载情况下,对队列进行暂停,部分暂停不生效的bug。
18+
319
## Version 0.1.9
420

521
_2016-01-23_
@@ -28,7 +44,7 @@ _2016-01-23_
2844

2945
#### 修复
3046

31-
- 修复: 修复`EventPool`中的listener存储器无限制的bug.
47+
- 修复: `EventPool`中的listener存储器无限制的bug.
3248

3349
## Version 0.1.5
3450

@@ -49,8 +65,8 @@ _2016-01-17_
4965

5066
#### 修复
5167

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

5571
#### 其他
5672

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
> [中文迭代日志](https://github.com/lingochamp/FileDownloader/blob/master/CHANGELOG-ZH.md)
44
5+
## Version 0.2.0
6+
7+
_2016-02-15_
8+
9+
#### New Interfaces
10+
11+
- `filedownloader.properties-http.lenient`: Add 'filedownloader.properties' for some special global configs, and add 'http.lenient' keyword to 'filedownloader.properties' to handle the case of want to ignore HTTP response header from download file server isn't legal.
12+
- `FileDownloadNotificationHelper`: Refashioning NotificationHelper, let handle notifications with FileDownloader more make sense. #25
13+
- `FileDownloader#init(Application,OkHttpClientCustomMaker)`: Support customize OkHttpClient which will be used for downloading files.
14+
15+
#### Fix
16+
17+
- Fix: Occur 'Concurrent Modification Exception' when Downloader service is unbound or lost connection to service and NeedRestart list not empty. #23
18+
- Fix: The case of re-connect from lost connection to service but all auto restart tasks' call-back do not effect.
19+
- Fix: In some cases of high concurrency, the Pause on some tasks is no effect.
20+
521
## Version 0.1.9
622

723
_2016-01-23_

README-zh.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Android 文件下载引擎,稳定、高效、简单易用
77

88
> [README DOC](https://github.com/lingochamp/FileDownloader/blob/master/README.md)
99
10-
> 本引擎依赖okhttp 3.0.1
10+
> 本引擎依赖okhttp 3.1.2
1111
1212
---
1313
#### 版本迭代日志: [Change Log](https://github.com/lingochamp/FileDownloader/blob/master/CHANGELOG.md)
@@ -51,13 +51,15 @@ compile 'com.liulishuo.filedownloader:library:0.1.9'
5151

5252
#### 全局初始化在`Application.onCreate`
5353

54+
> 如果希望定制化用于下载的`OkHttpClient`,建议参考[DemoApplication](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/DemoApplication.java)
55+
5456
```
5557
public XXApplication extends Application{
5658
5759
...
5860
@Override
5961
public void onCreate() {
60-
// 不耗时,做一些简单初始化准备工作,不会启动下载进程
62+
// 不耗时,仅仅只是缓存下Application的Context不会启动下载进程
6163
FileDownloader.init(this);
6264
}
6365
@@ -342,6 +344,20 @@ blockComplete -> completed
342344
| --- | ---
343345
| setDefaultSaveRootPath(path:String) | 在整个引擎中没有设置路径时`BaseDownloadTask#setPath`这个路径将会作为它的Root path
344346

347+
#### `FileDownloadNotificationHelper`
348+
349+
> 如何快速集成Notification呢? 建议参考[NotificationDemoActivity](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/NotificationDemoActivity.java)
350+
351+
#### `filedownloader.properties`
352+
353+
> 如果你需要使用'filedownloader.properties'却在项目根目录下没有找到该文件,可以直接在项目根目录下直接创建一个以'filedownloader.properties'作为文件名的文件即可。
354+
355+
> 格式: `keyword=value`
356+
357+
| 关键字 | 描述 | 默认值
358+
| --- | ---
359+
| http.lenient | 如果你遇到了: 'can't know the size of the download file, and its Transfer-Encoding is not Chunked either', 但是你想要忽略类似的返回头不规范的错误,直接将该关键字参数设置为`true`即可,我们将会将其作为`chunck`进行处理 | false
360+
345361

346362

347363
## III. 低内存情况

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Android multi-task file download engine.
88

99
> [中文文档](https://github.com/lingochamp/FileDownloader/blob/master/README-zh.md)
1010
11-
> This project dependency on [square/okhttp 3.0.1](https://github.com/square/okhttp)
11+
> This project dependency on [square/okhttp 3.1.2](https://github.com/square/okhttp)
1212
1313
## DEMO
1414

@@ -26,7 +26,7 @@ FileDownloader is installed by adding the following dependency to your build.gra
2626

2727
```
2828
dependencies {
29-
compile 'com.liulishuo.filedownloader:library:0.1.9'
29+
compile 'com.liulishuo.filedownloader:library:0.2.0'
3030
}
3131
```
3232

@@ -36,6 +36,7 @@ dependencies {
3636

3737
To begin using FileDownloader, have your`Application#onCreate` invoke the `FileDownloader.init(this)` such as:
3838

39+
> If your want to customize `OkHttpClient` for downloading files, @see [DemoApplication](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/DemoApplication.java)
3940
4041
```
4142
public XXApplication extends Application{
@@ -44,7 +45,7 @@ public XXApplication extends Application{
4445
@Override
4546
public void onCreate() {
4647
super.onCreate();
47-
// Just cache ApplicationContext
48+
// Just cache Application's Context.
4849
FileDownloader.init(this);
4950
}
5051
@@ -171,7 +172,7 @@ for (int i = 0; i < count; i++) {
171172
queueSet.disableCallbackProgressTimes(); // do not need for each task callback `FileDownloadListener#progress`,
172173
// we just consider which task will complete. so in this way reduce ipc will be effective optimization
173174
174-
// all tasks auto retry 1 time if download fail
175+
// each task will auto retry 1 time if download fail
175176
queueSet.setAutoRetryTimes(1);
176177
177178
if (serial) {
@@ -340,6 +341,20 @@ blockComplete -> completed
340341
| --- | ---
341342
| setDefaultSaveRootPath(path:String) | The path is used as Root Path in the case of task without setting path in the entire Download Engine
342343

344+
#### `FileDownloadNotificationHelper`
345+
346+
> How to integrate with Notification quickly? Recommend to refer to [NotificationDemoActivity](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/NotificationDemoActivity.java)
347+
348+
#### `filedownloader.properties`
349+
350+
> If you want to use this property and don't find 'filedownloader.properties' on the root path of your project, please create a new empty file with naming 'filedownloader.properties' on there feel free.
351+
352+
> Format: `keyword=value`.
353+
354+
| keyword | description | default
355+
| --- | ---
356+
| http.lenient | if you occur exception: 'can't know the size of the download file, and its Transfer-Encoding is not Chunked either', but you want to ignore such exception, set true, will deal with it as the case of transfer encoding chunk. | false
357+
343358

344359
## Attention
345360

filedownloader.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#if you occur exception: 'can't know the size of the download file, and its Transfer-Encoding is not Chunked either',
2-
#but you want to ignore such exception, set true, will As the case of transfer encoding chunk. default false
2+
#but you want to ignore such exception, set true, will deal with it as the case of transfer encoding chunk. default false
33
#if true, will ignore HTTP response header does not has content-length either not chunk transfer
44
#encoding. default false
55
http.lenient=true

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
VERSION_NAME=0.1.9
2-
VERSION_CODE=10
1+
VERSION_NAME=0.2.0
2+
VERSION_CODE=11
33
BUILD_TOOLS_VERSION=23.0.1
44
COMPILE_SDK_VERSION=23
55

66
GROUP=com.liulishuo.filedownloader
77
ARTIFACT_NAME=FileDownloader
8-
ARTIFACT_DESCRIPTION=多任务多线程并行/指定队列串行、高并发、高稳定性、独立进程、自动断点续传、多功能下载引擎
8+
ARTIFACT_DESCRIPTION=Android multi-task file download engine.
99
SITE_URL=https://github.com/lingochamp/FileDownloader
1010
ISSUE_SYSTEM=github
1111
ISSUE_URL=https://github.com/lingochamp/FileDownloader/issues
@@ -17,4 +17,4 @@ LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
1717
LICENCE_DIST=repo
1818
DEVELOPER_ID=jacksgong
1919
DEVELOPER_NAME=Jacks Gong
20-
DEVELOPER_EMAIL[email protected]
20+
DEVELOPER_EMAIL[email protected]

0 commit comments

Comments
 (0)