From e90263441e1e9404df7cfd4ef55f4e9b9419e88e Mon Sep 17 00:00:00 2001 From: leiqian Date: Thu, 2 Mar 2017 12:33:44 +0800 Subject: [PATCH 1/5] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 619d36f..e48902f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,12 @@ app自动更新模块,支持android7.0 #useage ``` -new UpgradeDialog(this, "发现新版本",str) +//7.0以下版本 +UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888/app-dxd-debug.apk",null); + +//7.0 +String authority = "com.upgrade.channey.test.fileProvider"; +UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888/app-dxd-debug.apk",authority); ``` ##Add it in your root build.gradle at the end of repositories: From 5164fd40b067247d6ec22a218461486ca6aad0ae Mon Sep 17 00:00:00 2001 From: leiqian Date: Thu, 2 Mar 2017 12:34:37 +0800 Subject: [PATCH 2/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e48902f..7d879b0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888 String authority = "com.upgrade.channey.test.fileProvider"; UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888/app-dxd-debug.apk",authority); ``` -##Add it in your root build.gradle at the end of repositories: +##Step 1.Add it in your root build.gradle at the end of repositories: allprojects { repositories { @@ -21,7 +21,7 @@ UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888 ##Step 2. Add the dependency dependencies { - compile 'com.github.abcdqianlei1990:Common-Upgrade:1.0.6' + compile 'com.github.abcdqianlei1990:Common-Upgrade:1.0.7' } ![baidu](http://imgsrc.baidu.com/forum/w%3D580/sign=279d5ba5f4faaf5184e381b7bc5594ed/a5560923dd54564e7bde17babade9c82d0584ff9.jpg "百度logo") From aaab2919e94468f27e09f315b03636930ab013cc Mon Sep 17 00:00:00 2001 From: leiqian Date: Thu, 2 Mar 2017 14:46:40 +0800 Subject: [PATCH 3/5] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 7d879b0..86555df 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,36 @@ UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888 String authority = "com.upgrade.channey.test.fileProvider"; UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888/app-dxd-debug.apk",authority); ``` +##什么是authority? +authority是content provider中定义的 + +a.在res目录下新建目录xml,然后xml目录中新建一个名为XXX.xml的文件. +示例如下: +``` + + + + + + + + +``` +b.在你的manifest中声明provider +``` + + + +``` + + + ##Step 1.Add it in your root build.gradle at the end of repositories: allprojects { From 6cadc390ce1fc5139f89747145672eaef42265aa Mon Sep 17 00:00:00 2001 From: leiqian Date: Thu, 2 Mar 2017 14:55:58 +0800 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86555df..797667e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ app自动更新模块,支持android7.0 UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888/app-dxd-debug.apk",null); //7.0 -String authority = "com.upgrade.channey.test.fileProvider"; +String authority = "com.upgrade.channey.test.fileProvider"; UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888/app-dxd-debug.apk",authority); ``` ##什么是authority? From 285deeaf286784592af3e43c148d8035f0dc5dea Mon Sep 17 00:00:00 2001 From: leiqian Date: Thu, 2 Mar 2017 15:00:43 +0800 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 797667e..93d81b7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ app自动更新模块,支持android7.0 UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888/app-dxd-debug.apk",null); //7.0 -String authority = "com.upgrade.channey.test.fileProvider"; +String authority = "com.upgrade.channey.test.fileProvider"; //**即manifest中provider的authority** UpgradeDialog.getInstance(this).show("有新版本","http://118.178.248.230:8888/app-dxd-debug.apk",authority); ``` ##什么是authority?