Skip to content

Commit ef44d4c

Browse files
committed
新增md5校验
通知栏进度可以取消
1 parent 77e10c3 commit ef44d4c

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
```gradle
4646
dependencies {
47-
compile 'com.qianwen:update-app:3.2.4'
47+
compile 'com.qianwen:update-app:3.2.5'
4848
}
4949
```
5050

@@ -192,6 +192,7 @@ dependencies {
192192
"apk_file_url": "https://raw.githubusercontent.com/WVector/AppUpdateDemo/master/apk/app-debug.apk", //apk下载地址
193193
"update_log": "1,添加删除信用卡接口\r\n2,添加vip认证\r\n3,区分自定义消费,一个小时不限制。\r\n4,添加放弃任务接口,小时内不生成。\r\n5,消费任务手动生成。",//更新内容
194194
"target_size": "5M",//apk大小
195+
"new_md5":"A818AD325EACC199BC62C552A32C35F2",
195196
"constraint": false//是否强制更新
196197
}
197198

app/src/main/java/com/vector/appupdatedemo/MainActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ protected UpdateAppBean parseJson(String json) {
254254
//更新内容
255255
.setUpdateLog(jsonObject.optString("update_log"))
256256
//是否强制更新
257-
.setConstraint(true)
258-
//设置md5
259-
.setNewMd5(jsonObject.optString("new_md5ddfdfdf"));
257+
.setConstraint(true);
258+
//设置md5
259+
// .setNewMd5(jsonObject.optString("new_md5ddfdfdf"));
260260
} catch (JSONException e) {
261261
e.printStackTrace();
262262
}

update-app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ publish {
4141
userOrg = 'qianwen'//bintray.com用户名
4242
groupId = 'com.qianwen'//jcenter上的路径
4343
artifactId = 'update-app'//项目名称
44-
publishVersion = '3.2.4'//版本号
44+
publishVersion = '3.2.5'//版本号
4545
desc = 'App update tools'
4646
website = 'https://github.com/WVector/AppUpdateDemo'
4747
}

0 commit comments

Comments
 (0)