rumboalla /
apkupdater
APKUpdater is an open source tool that simplifies the process of finding updates for your installed apps.
90/100 healthLoading repository data…
azhon / repository
Android App update library. Android版本更新库,简单、轻量、可随意定制
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
[!NOTE]
本库核心逻辑(必读):
1、当调用了
apkVersionCode()设置了最新的VersionCode,则内部会自动判断是否显示对话框、下载和安装
- 适配Android 13通知运行权限,且当设置
showNotification(true)时,点击对话框的升级按钮会申请通知栏权限,无论是否同意都将会继续下载- 当设置强制更新
forcedUpgrade(true)时,显示的对话框会显示下载进度条2、当没有调用
apkVersionCode(),就可以把它当成一个下载器,内部只会进行下载和安装3、由于Android 10限制后台应用启动Activity,所以下载完成会发送一个通知至通知栏(忽略showNotification的值,需要允许发送通知)
4、更多用法请点此查看
app/build.gradle添加依赖implementation 'io.github.azhon:appupdate:4.3.6'
android {
//...
productFlavors {
other {}
googlePlay {}
}
}
dependencies {
otherImplementation 'io.github.azhon:appupdate:latest-version'
googlePlayImplementation 'io.github.azhon:appupdate-no-op:latest-version'
}
DownloadManagerval manager = DownloadManager.Builder(this).run {
apkUrl("your apk url")
apkName("appupdate.apk")
smallIcon(R.mipmap.ic_launcher)
//设置了此参数,那么内部会自动判断是否需要显示更新对话框,否则需要自己判断是否需要更新
apkVersionCode(2)
//同时下面三个参数也必须要设置
apkVersionName('v4.2.2')
apkSize("7.7MB")
apkDescription("更新描述信息(取服务端返回数据)")
//省略一些非必须参数...
build()
}
manager?.download()
DownloadManager manager = new DownloadManager.Builder(this)
.apkUrl("your apk url")
.apkName("appupdate.apk")
.smallIcon(R.mipmap.ic_launcher)
//设置了此参数,那么内部会自动判断是否需要显示更新对话框,否则需要自己判断是否需要更新
.apkVersionCode(2)
//同时下面三个参数也必须要设置
.apkVersionName("v4.2.2")
.apkSize("7.7MB")
.apkDescription("更新描述信息(取服务端返回数据)")
//省略一些非必须参数...
.build();
manager.download();
Activity、Service不混淆-keep public class * extends android.app.Activity
-keep public class * extends android.app.Service
string.xml中取相同的名字即可)string.xml中取相同的名字即可以覆盖框架内设定的AppUpdate开头的TagBuilder设置安装包的MD5即可//旧版本apk的文件保存地址
val result = ApkUtil.deleteOldApk(this, "${externalCacheDir?.path}/appupdate.apk")
BaseHttpDownloadManagerclass MyDownload : BaseHttpDownloadManager() {}
android:configChanges="orientation|screenSize|keyboardHidden"
v4.3.6(2024/10/22)
如果这个库有帮助到你并且你很想支持库的后续开发和维护,那么你可以扫描下方二维码随意打赏我,我将不胜感激赞赏列表
Selected from shared topics, language and repository description—not editorial ratings.
rumboalla /
APKUpdater is an open source tool that simplifies the process of finding updates for your installed apps.
90/100 healthmobilenetworkltd /
List of awesome open source apps for Android. Updated daily!
86/100 healthjenly1314 /
🚀 AppUpdater一个专注于App更新,一键傻瓜式集成App版本升级的轻量开源库。(集成步骤超简单)
caoyanglee /
⤴️基于Kotlin的静默更新应用库 A library silently & automatically download latest apk to update your App
51/100 healthazzadpandit1122 /
Kotlin-based Android auto-update SDK with Jetpack Compose UI. In-app updates without Play Store. Lightweight, customizable, CI/CD-ready library for seamless APK version control.
39/100 healthkariemSeiam /
SnapUpdate: Android app update system with Flask backend API. Includes version cycle management, APK distribution, auto-installation, Material 3 design, and comprehensive update detection.
8/100 health