Skip to content

Commit

Permalink
适配至Android8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
teprinciple committed Nov 3, 2018
1 parent 6707917 commit cd761af
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# UpdateAppUtils1.5
# UpdateAppUtils1.5.1
### 一行代码,快速实现app在线下载更新 A simple library for Android update app
### 适配Android6.0、7.0、8.0
![](update.gif)
Expand All @@ -9,7 +9,7 @@
compile引入
```
dependencies {
compile 'com.teprinciple:updateapputils:1.5.0'
compile 'com.teprinciple:updateapputils:1.5.1'
}
```

Expand Down Expand Up @@ -82,9 +82,9 @@ UpdateAppUtils.from(this)


#### 更新日志
1.5.0<br>
1.5.1<br>
库内部适配至Android8.0
1.4<br>
<br>1.4<br>
使用[filedownloader](https://github.com/lingochamp/FileDownloader)替换DownloadManager,避免部分手机DownLoadManager无效,同时解决了重复下载的问题,且提高了下载速度<br>
增加接口UpdateAppUtils.needFitAndroidN(false),避免不需要适配7.0,也要设置FileProvider<br>
<br>1.3.1<br>
Expand Down
2 changes: 1 addition & 1 deletion UpdateAppUtils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies {
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
// This is the library version used when deploying the artifact
version = "1.5.0"
version = "1.5.1"

def siteUrl = 'https://github.com/teprinciple/UpdateAppDemo' // 项目的主页
def gitUrl = 'https://github.com/teprinciple/UpdateAppDemo.git' // Git仓库的url
Expand Down
2 changes: 1 addition & 1 deletion UpdateAppUtils/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="teprinciple.updateapputils.fileprovider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
Expand Down
2 changes: 1 addition & 1 deletion updateapputils/src/main/java/util/UpdateAppReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void toInstall(Context context) {

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

} else {
Expand Down

0 comments on commit cd761af

Please sign in to comment.