Skip to content

Commit

Permalink
docs: correct the comment for no use 'filedownloader.permission.RECEI…
Browse files Browse the repository at this point in the history
…VE_STATE' anymore

Refs #641
  • Loading branch information
Jacksgong committed Jul 4, 2017
1 parent 3aaa9a4 commit f7d6b3c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _2017-06-25_
- 在FileDownloader内部处理了各类重定向的情况(300、301、302、303、307、308)。 Closes #611
- 弃用了`FileDownloader#init`取而代之的是`FileDownloader#setup`,现在如果你不需要定制组件,就只需要在使用FileDownloader之前的任意使用调用这个方法就行。 Closes #500

> - 如果你使用`broadcast.completed`并且接收任务完成的广播,你需要在AndroidManifest中申明`filedownloader.permission.RECEIVE_STATE`权限以及注册Action为`filedownloader.intent.action.completed`的广播并且使用`FileDownloadBroadcastHandler`来处理接收到的`Intent`
> - 如果你使用`broadcast.completed`并且接收任务完成的广播,你需要在AndroidManifest中注册Action为`filedownloader.intent.action.completed`的广播并且使用`FileDownloadBroadcastHandler`来处理接收到的`Intent`
> - 现在, 不再使用`FileDownloader#init`, 取而代之的,如果你需要注册你的定制组件,你需要在`Application#onCreate`中调用`FileDownloader.setupOnApplicationOnCreate(application):InitCustomMaker`, 否则你只需要在使用FileDownloader之前的任意时候调用`FileDownloader.setup(Context)`即可。
#### 修复
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _2017-06-25_
- Handle the case of redirect(300、301、302、303、307、308) on FileDownloader self. Closes #611
- Deprecated the `FileDownloader#init` and add the replacer `FileDownloader#setup` to let user invoke anytime before using `Filedownloader`. Closes #500

> - If you want to using `broadcast.completed` and receive completed broadcast, you also need to declare `filedownloader.permission.RECEIVE_STATE` permission on the manifest, and register receiver with `filedownloader.intent.action.completed` action name and please using `FileDownloadBroadcastHandler` class to parse the received `Intent`.
> - If you want to using `broadcast.completed` and receive completed broadcast, you also need to register receiver with `filedownloader.intent.action.completed` action name on `AndroidManifest.xml` and please using `FileDownloadBroadcastHandler` class to parse the received `Intent`.
> - Now, rather than using `FileDownloader#init`, if you want to register your own customize components for FileDownloader please invoking `FileDownloader.setupOnApplicationOnCreate(application):InitCustomMaker` on the `Application#onCreate`, otherwise you just need invoke `FileDownloader.setup(Context)` anytime before using `FileDownloader`.
#### Fix
Expand Down
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ blockComplete -> completed
| file.non-pre-allocation | 是否不需要在开始下载的时候,预申请整个文件的大小(`content-length`) | false
| broadcast.completed | 是否需要在任务下载完成后发送一个完成的广播 | false

> 如果你使用`broadcast.completed`并且接收任务完成的广播,你需要在AndroidManifest中申明`filedownloader.permission.RECEIVE_STATE`权限以及注册Action为`filedownloader.intent.action.completed`的广播并且使用`FileDownloadBroadcastHandler`来处理接收到的`Intent`
> 如果你使用`broadcast.completed`并且接收任务完成的广播,你需要注册Action为`filedownloader.intent.action.completed`的广播并且使用`FileDownloadBroadcastHandler`来处理接收到的`Intent`
III. 异常处理

Expand Down
5 changes: 2 additions & 3 deletions demo/src/main/assets/filedownloader.properties
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ file.non-pre-allocation=false
# when a task is completed task, you will receive the broadcast, and the main process will be relaunched
# to handle the broadcast.
#
# If you want to receive such broadcast, you also need to declare 'filedownloader.permission.RECEIVE_STATE'
# permission on the manifest, and register receiver with 'filedownloader.intent.action.completed' action
# name.
# If you want to receive such broadcast, you also need to register receiver with
# 'filedownloader.intent.action.completed' action name on 'AndroidManifest.xml'.
#
# You can use FileDownloadBroadcastHandler class to parse the received intent.
#
Expand Down

0 comments on commit f7d6b3c

Please sign in to comment.