Skip to content

Commit

Permalink
publish 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Justson committed Jun 4, 2021
1 parent 7e28e45 commit 3c5df59
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Downloader
Downloader 是一个非常轻巧以及功能强大快速下载库,只有50KB 左右大小,对于大多数应用来说,性价比最高的一个下载库, 相比系统提供DownloadManager、FileDownloader 来说,Downloader 提供的API更简单、轻量且Downloader提供同步下载,系统通知进度等功能。
Downloader 是一个非常轻巧以及功能强大快速下载库,只有50KB 左右大小,对于大多数应用来说,性价比最高的一个下载库, Downloader 提供的API更简单、轻量且Downloader提供同步下载,系统通知进度等功能。

## 预览图

Expand Down Expand Up @@ -33,31 +33,30 @@ allprojects {
```

```
implementation 'com.github.Justson:Downloader:v4.1.9'
implementation 'com.github.Justson:Downloader:v4.2.0'
or
implementation 'com.github.Justson:Downloader:v4.2.0-androidx'
```

## 例子

#### 同步
```java
File file = DownloadImpl.getInstance()
.with(getApplicationContext())
File file = DownloadImpl.getInstance(getApplicationContext())
.url("http://shouji.360tpcdn.com/170918/93d1695d87df5a0c0002058afc0361f1/com.ss.android.article.news_636.apk")
.get();
```

#### 异步
```java
DownloadImpl.getInstance()
.with(getApplicationContext())
DownloadImpl.getInstance(getApplicationContext())
.url("http://shouji.360tpcdn.com/170918/f7aa8587561e4031553316ada312ab38/com.tencent.qqlive_13049.apk")
.enqueue();
```

#### 进度监听
```java
DownloadImpl.getInstance()
.with(getApplicationContext())
DownloadImpl.getInstance(getApplicationContext())
.target(new File(this.getExternalCacheDir(), "com.ss.android.article.news_636.apk"))
.setUniquePath(false)
.setForceDownload(true)
Expand Down
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion 14
targetSdkVersion TARGET_SDK_VERSION.toInteger()
versionCode 2
versionName "4.1.9"
versionName "4.2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
Expand Down
5 changes: 1 addition & 4 deletions library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE">
</uses-permission>
<application
android:allowBackup="true"
android:supportsRtl="true"
>
<application>
<provider
android:name="com.download.library.DownloadFileProvider"
android:authorities="${applicationId}.DownloadFileProvider"
Expand Down

0 comments on commit 3c5df59

Please sign in to comment.