AppUpdate
Introduction: 🚀 Android 版本更新 🚀 a library for android version update 🚀
Tags:
Install-目录
功能介绍
- [x] 实现 android 版本更新
- [x] 对 kotlin 适配,调用更简单
- [x] 自定义接口协议,可以不改变现有项目的协议就能使用
- [x] 支持 get,post 请求
- [x] 支持进度显示,对话框进度条,和通知栏进度条展示
- [x] 支持后台下载
- [x] 支持强制更新
- [x] 支持简单主题色配置(可以自动从顶部图片提取主色)
- [x] 支持自定义对话框(可以监听下载进度)
- [x] 支持静默下载(可以设置 wifi 状态下)
- [x] 支持 android7.0
效果图与示例 apk
点击下载 Demo.apk 或扫描下面的二维码安装
Gradle 依赖
java 方式引用
dependencies {
compile 'com.qianwen:update-app:3.5.2'
}
kotlin 方式引用
dependencies {
compile 'com.qianwen:update-app-kotlin:1.2.3'
}
简单使用
1,java 方式
new UpdateAppManager
.Builder()
//当前 Activity
.setActivity(this)
//更新地址
.setUpdateUrl(mUpdateUrl)
//实现 httpManager 接口的对象
.setHttpManager(new UpdateAppHttpUtil())
.build()
.update();
2,kotlin 方式
updateApp(mUpdateUrl, UpdateAppHttpUtil()).update()
详细说明
进度条使用的是代码家的「NumberProgressBar」
更新日志
kotlin 版本是依赖 java 版本的,所以 java 版本的问题 kotlin 自然修复
v3.5.2
1,修复下载过程中,关闭对话框不能自动安装问题。
v3.5.1
1,修复 bug
v3.5.0
1,优化强制更新
v3.4.8
1,修复 bug
v3.4.7
1,优化 APP 安装的问题
v3.4.6
1,优化 APP 安装的问题
v3.4.5
1,增加全局异常捕获方法
.handleException(new ExceptionHandler() {
@Override
public void onException(Exception e) {
}
})
v3.4.4
1,修复 bug
v3.4.3
1,修复 bug
v3.4.2
1,修复 bug
v3.4.1
1,给插件使用者更多的配置和开启一些钩子方便适配不同的业务需求
2,适配 android8.0
感谢Jiiiiiin对项目的维护
v3.4.0
1,修复
v3.3.9
1,适配 android8.0 的通知和安装未知来源的 app
感谢typ0520对项目的维护
v3.3.8
1,增加存储空间权限申请
V3.3.7
1,修改默认安装包下载路径为 download/packageName
感谢bean-liu对项目的维护
V3.3.6
1,去掉对下载路径前缀的校验。
https://github.com/WVector/AppUpdate/issues/26
V3.3.5
1,修复升级对话框布局中的问题。
2,修复静默下载,关闭更新弹窗 再点击更新 一直显示的问题。
https://github.com/WVector/AppUpdate/issues/21
V3.3.4
1,修复对话框更新内容过多,升级按钮被挤压的问题。
2,去掉自动从图片提取颜色的功能, 通过.setThemeColor()设置按钮和精度条颜色,
3,兼容 compileSdkVersion <25
V3.3.3
1,修复下载路径是重定向路径不能下载的问题
V3.3.2
1,修复正在下载时,返回桌面报错的问题
https://github.com/WVector/AppUpdate/issues/14
V3.3.1
1,修复对话框外可以点击的问题
V3.3.0
1,可以设置不显示通知栏进度条。
2,可以设置忽略版本。
3,优化下载时页面卡的问题(由于下载进度回调调用频繁,造成 ui 线程阻塞)。
4,可以静默下载,类似网易云音乐,并且设置 wifi 状态下。
V3.2.9
1,新增自定义对话框。
2,适配 kotlin,写法更简单。
License
Copyright 2017 千匍
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.