Skip to content

Commit cd761af

Browse files
committedNov 3, 2018
适配至Android8.0
1 parent 6707917 commit cd761af

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed
 

‎README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# UpdateAppUtils1.5
1+
# UpdateAppUtils1.5.1
22
### 一行代码,快速实现app在线下载更新 A simple library for Android update app
33
### 适配Android6.0、7.0、8.0
44
![](update.gif)
@@ -9,7 +9,7 @@
99
compile引入
1010
```
1111
dependencies {
12-
compile 'com.teprinciple:updateapputils:1.5.0'
12+
compile 'com.teprinciple:updateapputils:1.5.1'
1313
}
1414
```
1515

@@ -82,9 +82,9 @@ UpdateAppUtils.from(this)
8282

8383

8484
#### 更新日志
85-
1.5.0<br>
85+
1.5.1<br>
8686
库内部适配至Android8.0
87-
1.4<br>
87+
<br>1.4<br>
8888
使用[filedownloader](https://github.com/lingochamp/FileDownloader)替换DownloadManager,避免部分手机DownLoadManager无效,同时解决了重复下载的问题,且提高了下载速度<br>
8989
增加接口UpdateAppUtils.needFitAndroidN(false),避免不需要适配7.0,也要设置FileProvider<br>
9090
<br>1.3.1<br>

‎UpdateAppUtils/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies {
4141
apply plugin: 'com.github.dcendents.android-maven'
4242
apply plugin: 'com.jfrog.bintray'
4343
// This is the library version used when deploying the artifact
44-
version = "1.5.0"
44+
version = "1.5.1"
4545

4646
def siteUrl = 'https://github.com/teprinciple/UpdateAppDemo' // 项目的主页
4747
def gitUrl = 'https://github.com/teprinciple/UpdateAppDemo.git' // Git仓库的url

‎UpdateAppUtils/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<provider
2525
android:name="android.support.v4.content.FileProvider"
26-
android:authorities="teprinciple.updateapputils.fileprovider"
26+
android:authorities="${applicationId}.fileprovider"
2727
android:exported="false"
2828
android:grantUriPermissions="true">
2929
<meta-data

‎updateapputils/src/main/java/util/UpdateAppReceiver.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private void toInstall(Context context) {
114114

115115
i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
116116
Uri contentUri = FileProvider.getUriForFile(
117-
context, "teprinciple.updateapputils.fileprovider", apkFile);
117+
context, context.getPackageName() + ".fileprovider", apkFile);
118118
i.setDataAndType(contentUri, "application/vnd.android.package-archive");
119119

120120
} else {

0 commit comments

Comments
 (0)