File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Top Open diff view settings
updateapputils/src/main/java/util Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Top Open diff view settings Original file line number Diff line number Diff line change 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 )
99compile引入
1010```
1111dependencies {
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 >
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ dependencies {
4141apply plugin : ' com.github.dcendents.android-maven'
4242apply 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
4646def siteUrl = ' https://github.com/teprinciple/UpdateAppDemo' // 项目的主页
4747def gitUrl = ' https://github.com/teprinciple/UpdateAppDemo.git' // Git仓库的url
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments