{"id":45587934,"url":"https://github.com/appupgrade-dev/app-upgrade-android-sdk","last_synced_at":"2026-02-23T11:55:57.204Z","repository":{"id":159113839,"uuid":"587456418","full_name":"appupgrade-dev/app-upgrade-android-sdk","owner":"appupgrade-dev","description":"Official App Upgrade Android SDK","archived":false,"fork":false,"pushed_at":"2024-05-22T13:06:27.000Z","size":194,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T14:29:51.980Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appupgrade-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-10T19:48:27.000Z","updated_at":"2024-05-22T14:29:54.018Z","dependencies_parsed_at":"2024-05-22T14:40:01.002Z","dependency_job_id":null,"html_url":"https://github.com/appupgrade-dev/app-upgrade-android-sdk","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/appupgrade-dev/app-upgrade-android-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-android-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-android-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-android-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-android-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appupgrade-dev","download_url":"https://codeload.github.com/appupgrade-dev/app-upgrade-android-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-android-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-23T11:55:57.117Z","updated_at":"2026-02-23T11:55:57.191Z","avatar_url":"https://github.com/appupgrade-dev.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# App Upgrade: Android SDK\r\n\r\nAndroid SDK for [App Upgrade](https://appupgrade.dev)\r\n\r\nApp Upgrade is a service let your users know when to upgrade your apps or force them to upgrade the app.\r\n\r\n[![](https://jitpack.io/v/appupgrade-dev/app-upgrade-android-sdk.svg)](https://jitpack.io/#appupgrade-dev/app-upgrade-android-sdk)\r\n\r\nMany times we need to force upgrade mobile apps on users' mobile. Having faced this issue multiple times decided to find a better way to tackle this problem. After doing some research on how people are doing this there are so many custom solutions or checking with the play store or AppStore API if there is a new version available. Although this works if we just want to nudge users that there is a new version available. It doesn't solve the problem where we want to make a decision.. whether it's a soft graceful update or we want to force update. So here is this product that will make developers' life easy. We can set custom messages.. see the versions in beautify dashboard, and many exciting features in the roadmap ahead.\r\n\r\nThis SDK communicate with App Upgrade and check the version with store version information in App Upgrade. Based on response it will:\r\n- If app needs force update will show a non-dismissable popup for update. On click it will launch app in app store for user to update.\r\n- If app needs to be updated but not a force update, it will show a dismissable popup.\r\n- If no action is required it won't do anything.\r\n\r\nApp Upgrade is a cross platform solution to getting users to easily update your app.\r\n##### Stores Supported:\r\nApple App Store | Google Play Store | Amazon App Store | Huawei AppGallery | Other Android Markets\r\n--- | --- | --- | --- | ---\r\n**✓** | **✓** | **✓** | **✓** |  **✓** If your app market place isn't one of these you can pass your own store URL.\r\n\r\n## Installation\r\nInstall via gradle\r\n\r\n1. Add the JitPack repository to your settings.gradle file\r\n```\r\ndependencyResolutionManagement {\r\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\r\n    repositories {\r\n        google()\r\n        mavenCentral()\r\n        ...\r\n        maven { url \"https://jitpack.io\" }\r\n    }\r\n}\r\n```\r\nIf you are using gradle version prior to 7.x.x add the following in your root build.gradle at the end of repositories:\r\n```\r\nallprojects {\r\n    repositories {\r\n        ...\r\n        maven { url 'https://jitpack.io' }\r\n    }\r\n}\r\n```\r\n\r\nFor Kotlin build.gradle.kts syntax is:\r\n```\r\nallprojects {\r\n    repositories {\r\n        ...\r\n        maven (\"https://jitpack.io\")\r\n    }\r\n}\r\n```\r\n\r\n2. Add the dependency to your project\r\n```groovy\r\ndependencies {\r\n  implementation 'com.github.appupgrade-dev:app-upgrade-android-sdk:1.0.3'\r\n}\r\n```\r\n\r\n3. Internet Permission required. Add the following in AndroidManifest.xml file if not already present.\r\n```\r\n\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\r\n```\r\n\r\n4. If you are using `minifyEnabled true` it may obfuscate the code. Add the following rule in proguard-rules.pro to make sure SDK shows the popup.\r\n```\r\n# Keep all classes in the App Upgrade SDK package\r\n-keep class com.appupgrade.app_upgrade_android_sdk.** { *; }\r\n\r\n```\r\n\r\n## How to use it.\r\n1. Register on App Upgrade and follow the instructions to create project and get the x-api-key.\r\n2. Use the SDK.\r\n\r\n#### Kotlin\r\nAdd the following code in your MainActivity.kt -\u003e onCreate method.\r\n\r\n```kotlin\r\nclass MainActivity : AppCompatActivity() {\r\n    \r\n    private lateinit var appUpgrade: AppUpgrade\r\n\r\n    override fun onCreate(savedInstanceState: Bundle?) {\r\n        super.onCreate(savedInstanceState)\r\n        setContentView(R.layout.activity_main)\r\n\r\n        // App Upgrade\r\n        val xApiKey = \"ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5\"\r\n\r\n        val appInfo = AppInfo(\r\n            appId = \"com.android.com\",\r\n            appName = \"Wallpaper app\",\r\n            appVersion = \"1.0.0\",\r\n            platform = \"android\",\r\n            environment = \"production\",\r\n            appLanguage = \"es\"\r\n        )\r\n        \r\n        //Optional\r\n        val alertDialogConfig = AlertDialogConfig(\r\n            title = \"Update Required\", //Default: Please Update\r\n            updateButtonTitle = \"Update Now\", //Default: Update Now\r\n            laterButtonTitle = \"Not Now\" //Default: Later\r\n        )\r\n\r\n        val appUpgrade = AppUpgrade()\r\n        appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig)\r\n        \r\n        // appUpgrade.checkForUpdates(this, xApiKey, appInfom)\r\n    }\r\n}\r\n```\r\n\r\n#### Java\r\nAdd the following code in your MainActivity.java -\u003e onCreate method.\r\n```java\r\npublic class MainActivity extends AppCompatActivity {\r\n\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_main);\r\n\r\n        // App Upgrade\r\n        String xApiKey = \"ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5\";\r\n\r\n        String appId = \"com.android.com\";\r\n        String appName = \"Wallpaper app\";\r\n        String appVersion = \"1.0.0\";\r\n        String platform = \"android\";\r\n        String environment = \"production\";\r\n        String appLanguage = \"es\"; //Nullable\r\n\r\n        AppInfo appInfo = new AppInfo(appId, appName, appVersion, platform, environment, appLanguage);\r\n\r\n        // Optional\r\n        String title = \"Update Required.\";\r\n        String updateButtonTitle = \"UPDATE\";\r\n        String laterButtonTitle = \"Not Now\";\r\n        AlertDialogConfig alertDialogConfig = new AlertDialogConfig(title, updateButtonTitle, laterButtonTitle);\r\n        \r\n        AppUpgrade appUpgrade = new AppUpgrade();\r\n        appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig);\r\n        \r\n        // appUpgrade.checkForUpdates(this, xApiKey, appInfo);\r\n    }\r\n}\r\n```\r\n\r\n### Note:\r\n1. For opening the play store the app should be live.\r\n2. It might not be able to open the play store in simulator. You can try it in physical device.\r\n3. You can find a sample Kotlin app from here [app-upgrade-android-kotlin-demo-app](https://github.com/appupgrade-dev/app_upgrade_android_kotlin_demo_app) and a sample Java app from here [app-upgrade-android-java-demo-app](https://github.com/appupgrade-dev/app_upgrade_android_java_demo_app)\r\n4. Read detailed blog on how to integrate Kotlin app from here [How to upgrade/force upgrade Android Kotlin app](https://appupgrade.dev/blog/how-to-force-upgrade-android-kotlin-app) and Java app from here [How to upgrade/force upgrade Android Java app](https://appupgrade.dev/blog/how-to-force-upgrade-android-java-app)\r\n\r\n### Example with store other than app store or play store.\r\nIf you want users to redirect to store other than playstore. You can add these additional parameters **preferredAndroidMarket** see the example below.\r\n```kotlin\r\nclass MainActivity : AppCompatActivity() {\r\n    \r\n    private lateinit var appUpgrade: AppUpgrade\r\n\r\n    override fun onCreate(savedInstanceState: Bundle?) {\r\n        super.onCreate(savedInstanceState)\r\n        setContentView(R.layout.activity_main)\r\n\r\n        // App Upgrade\r\n        val xApiKey = \"ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5\"\r\n\r\n        val appInfo = AppInfo(\r\n            appId = \"com.android.com\",\r\n            appName = \"Wallpaper app\",\r\n            appVersion = \"1.0.0\",\r\n            platform = \"android\",\r\n            environment = \"production\",\r\n            appLanguage = \"es\",\r\n            preferredAndroidMarket = PreferredAndroidMarket.HUAWEI // or PreferredAndroidMarket.AMAZON or PreferredAndroidMarket.OTHER If not provided default is Google playstore. Optional\r\n        )\r\n\r\n        val appUpgrade = AppUpgrade()\r\n        appUpgrade.checkForUpdates(this, xApiKey, appInfo)\r\n    }\r\n}\r\n```\r\n\r\n- preferredAndroidMarket: PreferredAndroidMarket.AMAZON // or PreferredAndroidMarket.HUAWEI or PreferredAndroidMarket.OTHER If not provided default is Google playstore. If SDK fails to open preferred market place in case marketplace is not available then default Google playstore will be open.\r\n\r\nIf you want to redirect user to some other android market place you can use the following example:\r\n```kotlin\r\nclass MainActivity : AppCompatActivity() {\r\n    \r\n    private lateinit var appUpgrade: AppUpgrade\r\n\r\n    override fun onCreate(savedInstanceState: Bundle?) {\r\n        super.onCreate(savedInstanceState)\r\n        setContentView(R.layout.activity_main)\r\n\r\n        // App Upgrade\r\n        val xApiKey = \"ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5\"\r\n\r\n        val appInfo = AppInfo(\r\n            appId = \"com.android.com\",\r\n            appName = \"Wallpaper app\",\r\n            appVersion = \"1.0.0\",\r\n            platform = \"android\",\r\n            environment = \"production\",\r\n            appLanguage = \"es\",\r\n            preferredAndroidMarket = PreferredAndroidMarket.HUAWEI, // or PreferredAndroidMarket.AMAZON or PreferredAndroidMarket.OTHER If not provided default is Google playstore. Optional\r\n            otherAndroidMarketUrl = \"https://otherandroidmarketurl.com/app/id\" // Required if preferredAndroidMarket is OTHER.\r\n        )\r\n\r\n        val appUpgrade = AppUpgrade()\r\n        appUpgrade.checkForUpdates(this, xApiKey, appInfo)\r\n    }\r\n}\r\n```\r\n\r\n## Screenshot\r\n ![forceupgrade_android_kotlin](https://raw.githubusercontent.com/appupgrade-dev/app-upgrade-assets/main/images/forceupgrade_android_kotlin.png)\r\n\r\n## App Upgrade Docs\r\nFor more information visit [App Upgrade](https://appupgrade.dev)\r\n\r\n### Changelog\r\n\r\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\r\n\r\n### Contributing\r\n\r\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CODE OF CONDUCT](CODE_OF_CONDUCT.md) for details.\r\n\r\n### License\r\n\r\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\r\n\r\n## Need help?\r\n\r\nIf you're looking for help, try our [Documentation](https://appupgrade.dev/docs/) or our [FAQ](https://appupgrade.dev/docs/app-upgrade-faq).\r\nIf you need support please write to us at support@appupgrade.dev\r\n\r\n### Happy Coding!!!\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappupgrade-dev%2Fapp-upgrade-android-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappupgrade-dev%2Fapp-upgrade-android-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappupgrade-dev%2Fapp-upgrade-android-sdk/lists"}