You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`FileDownloader#unBindServiceIfIdle(void)`: If there is no active task in the `:filedownloader` progress currently , then unbind & stop `:filedownloader` process
10
+
-`FileDownloader#getStatus(downloadId)`: Get download status by the downloadId(ps: Please refer to [Tasks Manager demo](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/TasksManagerDemoActivity.java)
11
+
-`FileDownloader#isServiceConnected(void)`: Whether started and connected to the `:filedownloader` progress(ps: Please refer to [Tasks Manager demo](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/TasksManagerDemoActivity.java))
12
+
13
+
#### Enhancement
14
+
15
+
- 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)).
16
+
- Improve Performance: Reduce IPC.
17
+
- Improve Performance: Reduce lock.
18
+
- Improve Performance: Delete invalid datas in db with the `:filedownloader` progress start.
19
+
- Improve Performance: Ignore the `callbackProgressTimes` column in db.
20
+
21
+
#### Fix
22
+
23
+
- 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.
24
+
- Fix not release connect resources when invoke `FileDownloader#unBinderService` manually.
25
+
- Handle case of ui progress be killed by sys and download progress not be killed, and ui progress relives and reexecutes same tasks queue.
26
+
27
+
5
28
### Version 0.1.3
6
29
7
30
- Enhancement: no longer subject to the upper bound of 1.99G, add `FileDownloadLargeFileListener`, `getLargeFileSoFarBytes()`,`getLargeFileTotalBytes()`.
@@ -139,6 +139,7 @@ final FileDownloadListener queueTarget = new FileDownloadListener() {
139
139
140
140
for (String url : URLS) {
141
141
FileDownloader.getImpl().create(url)
142
+
.setCallbackProgressTimes(0) // why do this? in here i assume do not need callback each task's `FileDownloadListener#progress`, so in this way reduce ipc will be effective optimization
142
143
.setListener(queueTarget)
143
144
.ready();
144
145
}
@@ -167,14 +168,17 @@ if(parallel){
167
168
| --- | ---
168
169
| init(Application) | Just cache ApplicationContext
169
170
| create(url:String) | Create a download task
170
-
| start(listener:FileDownloadListener, isSerial:boolean) | Start the download queue by the same listener
171
+
| start(listener:FileDownloadListener, isSerial:boolean) | Start the download queue by the same listener(maybe do not need callback each task's `FileDownloadListener#progress` in this case, then set `setCallbackProgressTimes(0)` is effective optimization)
171
172
| pause(listener:FileDownloadListener) | Pause the download queue by the same listener
172
173
| pauseAll(void) | Pause all task
173
174
| pause(downloadId) | Pause the download task by the downloadId
174
175
| getSoFar(downloadId) | Get downloaded so far bytes by the downloadId
175
176
| getTotal(downloadId) | Get file total bytes by the downloadId
176
177
| bindService(void) | Bind & start `:filedownloader` process manually(Do not need, will bind & start automatically by Download Engine if real need)
177
-
| unBindService(void) | Unbind & stop `:filedownloader` process manually(Do not need, will unbind & stop automatically by System if leave unused period)
178
+
| unBindService(void) | Unbind & stop `:filedownloader` process manually
179
+
| unBindServiceIfIdle(void) | If there is no active task in the `:filedownloader` progress currently , then unbind & stop `:filedownloader` process
180
+
| isServiceConnected(void) | Whether started and connected to the `:filedownloader` progress(ps: Please refer to [Tasks Manager demo](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/TasksManagerDemoActivity.java))
181
+
| getStatus(downloadId) | Get download status by the downloadId(ps: Please refer to [Tasks Manager demo](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/TasksManagerDemoActivity.java))
178
182
179
183
#### `FileDownloadTask`
180
184
@@ -250,6 +254,14 @@ blockComplete -> completed
250
254
- Default by okhttp: retryOnConnectionFailure: Unreachable IP addresses/Stale pooled connections/Unreachable proxy servers
251
255
- Default by okhttp: connection/read/write time out 10s
252
256
257
+
#### Low Memory?
258
+
259
+
We covered all low memory cases follow [Processes and Threads](http://developer.android.com/guide/components/processes-and-threads.html), just feel free to use the FileDownloader, it will be follow your expect.
260
+
261
+
262
+
#### Chunked transfer encoding data?
263
+
264
+
Has supported, just use as normal task, but 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).
0 commit comments