pull/330/head
AriaLyy 8 years ago
parent 4d6d87375e
commit 3e79720d43
  1. 2
      README.md
  2. 61
      app/src/main/java/com/arialyy/simple/single_task/SingleTaskActivity.java

@ -17,7 +17,7 @@ Aria,致力于让下载傻瓜化</br>
## 下载 ## 下载
[![Download](https://api.bintray.com/packages/arialyy/maven/Aria/images/download.svg)](https://bintray.com/arialyy/maven/Aria/_latestVersion)</br> [![Download](https://api.bintray.com/packages/arialyy/maven/Aria/images/download.svg)](https://bintray.com/arialyy/maven/Aria/_latestVersion)</br>
```java ```java
compile 'com.arialyy.aria:Aria:2.4.2' compile 'com.arialyy.aria:Aria:2.4.4'
``` ```
## 示例 ## 示例

@ -201,67 +201,6 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.apk") .setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.apk")
.setDownloadName("test.apk") .setDownloadName("test.apk")
.start(); .start();
//DownloadEntity entity = new DownloadEntity();
//entity.setDownloadUrl(DOWNLOAD_URL);
//entity.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.apk");
//entity.setFileName("test.apk");
//DownloadUtil util = new DownloadUtil(this, entity, new IDownloadListener() {
// long fileSize = 1;
// @Override public void supportBreakpoint(boolean support) {
//
// }
//
// @Override public void onCancel() {
//
// }
//
// @Override public void onFail() {
//
// }
//
// @Override public void onPre() {
//
// }
//
// @Override public void onPostPre(long fileSize) {
// this.fileSize = fileSize;
// }
//
// @Override public void onProgress(long currentLocation) {
// long current = currentLocation;
// long len = fileSize;
// if (len == 0) {
// mPb.setProgress(0);
// } else {
// mPb.setProgress((int) ((current * 100) / len));
// }
// }
//
// @Override public void onChildComplete(long finishLocation) {
//
// }
//
// @Override public void onStart(long startLocation) {
//
// }
//
// @Override public void onChildResume(long resumeLocation) {
//
// }
//
// @Override public void onResume(long resumeLocation) {
//
// }
//
// @Override public void onStop(long stopLocation) {
//
// }
//
// @Override public void onComplete() {
//
// }
//});
//util.startDownload();
} }
private void stop() { private void stop() {

Loading…
Cancel
Save