supersu-man
/
apkupdater-library
Checks for the latest release in the GitHub repo and if latest apk release is found, it downloads the apk for you.
If you release APK files with every new GitHub release, APKUpdater-Library can make updating your app seamless.
Requirements
- Version Consistency
Your Gradle
versionName
and GitHub release tag version must match. Adding av
prefix in GitHub is optional.
Gradle:
versionName "X.Y"
or
versionName "X.Y.Z"
GitHub Release Tag:
vX.Y or X.Y
or
vX.Y.Z or X.Y.Z
- Add JitPack repository
In your top-level
build.gradle
:
allprojects {
repositories {
/// ....
maven { url "https://jitpack.io" }
}
}
- Add the library dependency
In your module-level
build.gradle
:
implementation 'com.github.supersu-man:apkupdater-library:v2.1.0'
Usage
- Initialize the Updater
val url = "https://github.com/supersu-man/macronium-android/releases/latest"
val updater = ApkUpdater(this@MainActivity, url)
- Check for update
updater.isNewUpdateAvailable {
//Your code when new update is found in the repo
}
Example
thread {
val url = "https://github.com/supersu-man/macronium-android/releases/latest"
val updater = ApkUpdater(this@MainActivity, url)
updater.threeNumbers = false //if versioning is X.Y
updater.threeNumbers = true //if versioning is X.Y.Z
checkForUpdates(updater)
}
private fun checkForUpdates(updater: ApkUpdater) {
if (updater.isNewUpdateAvailable() == true) {
updater.requestDownload()
}
}
Recommended Read 📖
If you’d like to understand the complete process of building, signing, and releasing Android apps on GitHub using GitHub Actions, I highly recommend reading my earlier post first — it covers all the fundamentals before we dive into using secrets:
Building, Signing and Releasing Android Apps with GitHub Actions
Top comments (2)
To
Upload the APK: Go to your GitHub repository, create a new release, and attach the APK file.
Update Library: Adjust your project’s visit website library dependencies if needed (e.g., update version numbers in Gradle).
Publish Release: Complete the release process and notify users of the update.
Lucky Win 777 often includes daily bonuses, free spins, and special events that reward players just for logging in or playing consistently Download here. These features allow users to enjoy extended gameplay without necessarily spending money. This reward system keeps players motivated and adds an element of anticipation, making the game more engaging over time.