In-app version update libraryUpdateVersion
UpdateVersion is an Android version update library.
GitHub warehouse address
introduce
gradle
allprojects {
repositories {
maven {
url 'https://jitpack.io' }
}
}
implementation 'com.github.DL-ZhangTeng:UpdateVersion:2.0.1'
//使用的三方库
implementation 'com.github.DL-ZhangTeng:Utils:2.0.3'
renderings
Attributes
attribute name | describe |
---|---|
isAutoInstall | Whether to install automatically after the download is completed |
isProgressDialogShow | Whether to display the download progress pop-up window (it will not pop up when the notification bar shows download) |
isNotificationShow | Whether the notification bar displays download progress notifications and installation confirmation notifications (installation confirmation notifications will not be sent during automatic installation) |
isUpdateDialogShow | Whether to display update prompt information pop-up window |
isNetCustomDialogShow | Whether to display mobile network prompt information pop-up window |
isHintVersion | Whether it prompts "The current version is already the latest version" |
isUpdateDownloadWithBrowser | Whether to use browser to download |
checkUpdateCommonUrl | Get version information url (CommonHttpClient can be rewritten) |
provider | FileProvider(默认:BuildConfig.LIBRARY_PACKAGE_NAME + “.FileProvider”) |
sslParams | HTTPS certificate |
isUpdateTest | Whether it is test mode (data source: versionInfo.json) |
themeColor | theme color |
setProgressDrawable | Set progress bar style |
uploadImage | Prompt to update information pop-up window background image |
noNetImage | Network prompt information pop-up window background image |
use
UpdateVersion.Builder()
//是否为调试模式
.isUpdateTest(true)
//通知栏显示
.isNotificationShow(true)
//是否自动安装
.isAutoInstall(true)
//是否提示更新信息
.isHintVersion(true)
//是否显示更新dialog
.isUpdateDialogShow(true)
//是否显示移动网络提示dialog
.isNetCustomDialogShow(true)
//是否显示下载进度dialog
.isProgressDialogShow(true)
//是否使用浏览器更新
.isUpdateDownloadWithBrowser(false)
//获取服务器的版本信息
.setCheckUpdateCommonUrl("http://")
.setProvider(BuildConfig.APPLICATION_ID + ".FileProvider")
.build()
//执行更新任务
.updateVersion(CommonHttpClient(this))
Confuse
-keep public class com.zhangteng.**.*{ *; }
historic version
Version | renew | Update time |
---|---|---|
v2.0.1 | Android8.0 unknown application installation compatible | 2022/11/25 at 13:22 |
v2.0.0 | Use coroutines to handle asynchronous tasks | 2022/9/17 at 18:58 |
v1.5.0 | Compatible with partitioned storage | 2022/9/16 at 16:23 |
v1.4.0 | Use standalone Utils library | 2022/9/2 at 20:43 |
v1.3.0 | Add HTTPS support | 2022/8/20 at 13:48 |
v1.2.1 | Use new version of utils | 2022/6/30 at 10:30 |
v1.2.0 | Using the utils of the base library | 2022/1/21 at 16:01 |
v1.1.6 | Add progress bar style customization | 2021/12/23 at 12:41 |
v1.1.5 | Avoid progress less than 0 or NaN | 2021/12/23 at 10:27 |
v1.1.4 | Add update prompt pop-up window settings & mobile network pop-up window settings | 2021/12/22 at 20:10 |
v1.1.3 | String and color use resources. You can use resources with the same name in the app to replace the dialog display. | 2021/8/29 at 17:18 |
v1.1.2 | String and color use resources. You can use resources with the same name in the app to replace the dialog display. | 2021/8/29 at 17:06 |
v1.1.1 | The browser uses the server to return the version information URL when downloading | 2020/8/27 at 16:31 |
v1.1.0 | Migrate to androidx | 2020/7/22 0022 at 12:04 pm |
v1.0.2 | Add theme customization | 2020/6/1 0001 at 17:54 pm |
Appreciate
If you like UpdateVersion, or feel that UpdateVersion has helped you, you can click "Star" in the upper right corner to support it. Your support is my motivation, thank you.
contact me
Email: [email protected]/[email protected]
License
Copyright © [2020] [Swing]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.