{"id":3638,"url":"https://github.com/javiersantos/AppUpdater","last_synced_at":"2025-08-03T22:31:52.403Z","repository":{"id":41306948,"uuid":"50940897","full_name":"javiersantos/AppUpdater","owner":"javiersantos","description":"A library that checks for your apps' updates on Google Play, GitHub, Amazon, F-Droid or your own server. API 9+ required.","archived":false,"fork":false,"pushed_at":"2024-06-28T09:56:54.000Z","size":3692,"stargazers_count":1986,"open_issues_count":60,"forks_count":413,"subscribers_count":70,"default_branch":"master","last_synced_at":"2024-12-05T04:03:16.780Z","etag":null,"topics":["android-library","changelog","dialog","google-play","snackbar","updater"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javiersantos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2016-02-02T18:10:59.000Z","updated_at":"2024-12-03T14:53:05.000Z","dependencies_parsed_at":"2024-11-20T07:08:15.209Z","dependency_job_id":"942efcf7-3e70-4a1b-8b54-0ff398b5eb36","html_url":"https://github.com/javiersantos/AppUpdater","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiersantos%2FAppUpdater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiersantos%2FAppUpdater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiersantos%2FAppUpdater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiersantos%2FAppUpdater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javiersantos","download_url":"https://codeload.github.com/javiersantos/AppUpdater/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228571844,"owners_count":17938772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["android-library","changelog","dialog","google-play","snackbar","updater"],"created_at":"2024-01-05T20:16:47.156Z","updated_at":"2024-12-07T06:30:33.258Z","avatar_url":"https://github.com/javiersantos.png","language":"Java","funding_links":[],"categories":["Java","Libraries","Libs"],"sub_categories":["Version Checking","\u003cA NAME=\"Component\"\u003e\u003c/A\u003eComponent"],"readme":"\u003ch1 align=\"center\"\u003eAppUpdater \u003ca href=\"https://github.com/javiersantos/AppUpdater#how-to-include\"\u003e\u003cimg src=\"https://jitpack.io/v/javiersantos/AppUpdater.svg\"\u003e\u003c/a\u003e\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eAndroid Library\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://android-arsenal.com/api?level=8\"\u003e\u003cimg src=\"https://img.shields.io/badge/API-9%2B-orange.svg\"\u003e\u003c/a\u003e\n  \u003ca target=\"_blank\" href=\"https://travis-ci.org/javiersantos/AppUpdater\"\u003e\u003cimg src=\"https://travis-ci.org/javiersantos/AppUpdater.svg?branch=master\"\u003e\u003c/a\u003e\n  \u003ca target=\"_blank\" href=\"http://android-arsenal.com/details/1/3094\"\u003e\u003cimg src=\"https://img.shields.io/badge/Android%20Arsenal-AppUpdater-blue.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eAndroid Library that checks for updates on Google Play, GitHub, Amazon, F-Droid or your own server. This library notifies your apps' updates by showing a Material dialog, Snackbar or notification. Check out the \u003ca href=\"https://github.com/javiersantos/AppUpdater/wiki\"\u003ewiki\u003c/a\u003e.\u003c/p\u003e\n\n## Sample Project\nYou can download the latest sample APK from Google Play:\n\n\u003ca target=\"_blank\" href=\"https://play.google.com/store/apps/details?id=com.github.javiersantos.appupdater.demo\"\u003e\u003cimg src=\"https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png\" height=\"60\"\u003e\u003c/a\u003e\n\n## How to include\nAdd the repository to your project **build.gradle**:\n```Gradle\nrepositories {\n    maven {\n        url \"https://jitpack.io\"\n    }\n}\n```\n\nAnd add the library to your module **build.gradle**:\n```Gradle\ndependencies {\n    implementation 'com.github.javiersantos:AppUpdater:2.7'\n}\n```\n\n## Usage\n\n### Activity / Fragment\nBy default, the basic usage will show a default dialog when a new version is found on the Play Store (otherwise nothing will be shown). By calling the `.start()` method, the library will work in background. You can cancel it at any time by calling `.stop()`. Other customizations are explained below.\n\n#### Activity\n```Java\nAppUpdater appUpdater = new AppUpdater(this);\nappUpdater.start();\n```\n\n#### Fragment\n```Java\nAppUpdater appUpdater = new AppUpdater(getActivity());\nappUpdater.start();\n```\n\n## Customizations ([Wiki](https://github.com/javiersantos/AppUpdater/wiki))\n\n### Displaying a dialog, Snackbar or notification\nThe default usage is configured to display a dialog. However, there are other ways to show the update notice.\n\n```Java\nnew AppUpdater(this)\n\t.setDisplay(Display.SNACKBAR)\n\t.setDisplay(Display.DIALOG)\n\t.setDisplay(Display.NOTIFICATION)\n\t...\n```\n\nWhen using `Display.DIALOG`, you can make the dialog dismissable when touching outside by using `.setCancelable(false)` (enabled by default).\n\nWhen using `Display.SNACKBAR`, you can change the duration by using `.setDuration(Duration.NORMAL)` (default) or \n`.setDuration(Duration.INDEFINITE)`.\n\n### Providing a source for the updates\nBy default the library will check for updates on the Play Store. However, there are other alternatives, such as GitHub, Amazon, F-Droid or using your own server.\n\n```Java\nnew AppUpdater(this)\n\t.setUpdateFrom(UpdateFrom.GITHUB)\n\t.setUpdateFrom(UpdateFrom.GOOGLE_PLAY)\n\t.setUpdateFrom(UpdateFrom.AMAZON)\n\t.setUpdateFrom(UpdateFrom.FDROID)\n\t.setUpdateFrom(UpdateFrom.XML)\n\t.setUpdateFrom(UpdateFrom.JSON)\n\t...\n```\n\nWhen using GitHub you must provide the repo where the library will check for updates: `.setGitHubUserAndRepo(\"javiersantos\", \"AppUpdater\")`. Check out the [wiki](https://github.com/javiersantos/AppUpdater/wiki/UpdateFrom.GITHUB) for more details.\n\nWhen using the XML source you must upload a .xml file somewhere on the Internet following the structure explained in the [wiki](https://github.com/javiersantos/AppUpdater/wiki/UpdateFrom.XML) and add the URL as shown in this example: `.setUpdateXML(\"https://raw.githubusercontent.com/javiersantos/AppUpdater/master/app/update-changelog.xml\")`.\n\nWhen using the JSON source you must upload a .json file somewhere on the Internet following the structure explained in the [wiki](https://github.com/javiersantos/AppUpdater/wiki/UpdateFrom.JSON) and add the URL as shown in this example: `.setUpdateJSON(\"https://raw.githubusercontent.com/javiersantos/AppUpdater/master/app/update-changelog.json\")`.\n\nA detailed description with examples is available at: https://github.com/javiersantos/AppUpdater/wiki\n\n### Setting the frequency to show updates\nBy default, a dialog/Snackbar/notification will be shown whenever a new version is found. However, this can be set to show only every X times that the app ascertains that a new update is available.\n\n```Java\nnew AppUpdater(this)\n\t.showEvery(5)\n\t...\n```\n\nYou can also show the dialog, Snackbar or notification although there aren't updates by using `.showAppUpdated(true)` (disabled by default).\n\n### Customizing the title, description, buttons and more\n\n```Java\nnew AppUpdater(this)\n\t.setTitleOnUpdateAvailable(\"Update available\")\n\t.setContentOnUpdateAvailable(\"Check out the latest version available of my app!\")\n\t.setTitleOnUpdateNotAvailable(\"Update not available\")\n\t.setContentOnUpdateNotAvailable(\"No update available. Check for updates again later!\")\n\t.setButtonUpdate(\"Update now?\")\n\t.setButtonUpdateClickListener(...)\n\t.setButtonDismiss(\"Maybe later\")\n\t.setButtonDismissClickListener(...)\n\t.setButtonDoNotShowAgain(\"Huh, not interested\")\n\t.setButtonDoNotShowAgainClickListener(...)\n\t.setIcon(R.drawable.ic_update) // Notification icon \n\t.setCancelable(false) // Dialog could not be dismissable\n\t...\n```\n\nBy default, the \"Don't show again\" button will be displayed. Use `.setButtonDoNotShowAgain(null)` to hide the button.\n\n## AppUpdaterUtils\nThe AppUpdaterUtils class works in the same way that the AppUpdater class does, but it won't display any dialog, Snackbar or notification. When using the AppUpdaterUtils class you must provide a custom callback that will be called when the latest version has been checked.\n\n### Using custom callbacks\nAdding a callback to the builder allows you to customize what will happen when the latest update has been checked. Keep in mind that when using this method you must be aware of displaying any dialog, snackbar or whatever you want to let the user know that there is a new update available.\n\n```Java\nAppUpdaterUtils appUpdaterUtils = new AppUpdaterUtils(this)\n    //.setUpdateFrom(UpdateFrom.AMAZON)\n    //.setUpdateFrom(UpdateFrom.GITHUB)\n    //.setGitHubUserAndRepo(\"javiersantos\", \"AppUpdater\")\n    //...\n    .withListener(new AppUpdaterUtils.UpdateListener() {\n        @Override\n        public void onSuccess(Update update, Boolean isUpdateAvailable) {\n            Log.d(\"Latest Version\", update.getLatestVersion());\n\t    Log.d(\"Latest Version Code\", update.getLatestVersionCode());\n\t    Log.d(\"Release notes\", update.getReleaseNotes());\n\t    Log.d(\"URL\", update.getUrlToDownload());\n\t    Log.d(\"Is update available?\", Boolean.toString(isUpdateAvailable));\n        }\n        \n        @Override\n        public void onFailed(AppUpdaterError error) {\n            Log.d(\"AppUpdater Error\", \"Something went wrong\");\n        }\n     });\nappUpdaterUtils.start();\n```\n\n![AppUpdater](https://raw.githubusercontent.com/javiersantos/AppUpdater/master/Screenshots/banner.png)\n\n## License\n\tCopyright 2016 Javier Santos\n\t\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\t\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\t\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviersantos%2FAppUpdater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaviersantos%2FAppUpdater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviersantos%2FAppUpdater/lists"}