From c59aff93d674221bf673c0f64bbc25be977492c2 Mon Sep 17 00:00:00 2001 From: fccaikai <714564390@qq.com> Date: Mon, 25 Sep 2017 14:07:16 +0800 Subject: [PATCH] callback has new version --- .idea/misc.xml | 15 +------------ README.md | 4 ++-- README_zh.md | 4 ++-- .../com/kcode/appupdate/MainActivity.java | 4 ++-- .../java/com/kcode/lib/UpdateWrapper.java | 8 +++---- .../com/kcode/lib/net/CheckUpdateTask.java | 21 +++++++++++++------ 6 files changed, 26 insertions(+), 30 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 319e461..f61a7d3 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -43,25 +43,12 @@ - - - - - - - - - - - + - - $USER_HOME$/.subversion - diff --git a/README.md b/README.md index f748190..ab00f78 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ android app update library ```groovy dependencies { - compile 'com.github.fccaikai:AppUpdate:2.1.3' + compile 'com.github.fccaikai:AppUpdate:2.1.4' } ``` @@ -54,7 +54,7 @@ UpdateWrapper updateWrapper = new UpdateWrapper.Builder(getApplicationContext()) //add callback ,return new version info .setCallback(new CheckUpdateTask.Callback() { @Override - public void callBack(VersionModel model) { + public void callBack(VersionModel model,booleab hasNewVersion) { Log.d(TAG,"new version :" + model.getVersionName()); } }) diff --git a/README_zh.md b/README_zh.md index 201f05c..00514ee 100644 --- a/README_zh.md +++ b/README_zh.md @@ -33,7 +33,7 @@ Android 检查更新库 ```groovy dependencies { - compile 'com.github.fccaikai:AppUpdate:2.1.3' + compile 'com.github.fccaikai:AppUpdate:2.1.4' } ``` @@ -52,7 +52,7 @@ UpdateWrapper updateWrapper = new UpdateWrapper.Builder(getApplicationContext()) //add callback ,return new version info .setCallback(new CheckUpdateTask.Callback() { @Override - public void callBack(VersionModel model) { + public void callBack(VersionModel model,boolean hasNewVersion) { Log.d(TAG,"new version :" + model.getVersionName()); } }) diff --git a/app/src/main/java/com/kcode/appupdate/MainActivity.java b/app/src/main/java/com/kcode/appupdate/MainActivity.java index eeee9b9..746275d 100644 --- a/app/src/main/java/com/kcode/appupdate/MainActivity.java +++ b/app/src/main/java/com/kcode/appupdate/MainActivity.java @@ -44,8 +44,8 @@ private void checkUpdate(final long time, final Class