{"id":13575900,"url":"https://github.com/burgyl/SelfUpdatingApp","last_synced_at":"2025-04-04T23:30:53.454Z","repository":{"id":217505317,"uuid":"291031556","full_name":"burgyl/SelfUpdatingApp","owner":"burgyl","description":"An Android Application that can update itself if new releases in GitHub are available.","archived":false,"fork":false,"pushed_at":"2021-01-19T17:22:52.000Z","size":197,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-05T11:44:39.797Z","etag":null,"topics":["android","java","update","update-checker","updater"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/burgyl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-08-28T11:38:59.000Z","updated_at":"2024-08-25T08:07:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"876bcada-1564-406a-8852-dc84e8c34027","html_url":"https://github.com/burgyl/SelfUpdatingApp","commit_stats":null,"previous_names":["burgyl/selfupdatingapp"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burgyl%2FSelfUpdatingApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burgyl%2FSelfUpdatingApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burgyl%2FSelfUpdatingApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burgyl%2FSelfUpdatingApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/burgyl","download_url":"https://codeload.github.com/burgyl/SelfUpdatingApp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266474,"owners_count":20910831,"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","java","update","update-checker","updater"],"created_at":"2024-08-01T15:01:05.225Z","updated_at":"2025-04-04T23:30:53.448Z","avatar_url":"https://github.com/burgyl.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# Self Updating App\nAn Android Application that can update itself if new releases in GitHub are available.\n\nBased on [*Implement an in-app update function*](https://medium.com/grandcentrix/implement-an-in-app-updater-1f50fbc38416) by [Tom Seifert](https://medium.com/@Syex).\n\n## Requirements\nWorks on Android API 21 (5.0, Lollipop) and above (because of [OkHttp](https://github.com/square/okhttp)).\nYour releases' tags must be the code version of the app and an APK must be in the binaries.\n\n## What it does\nIt shows a dialog with the changelog and the name of the last release if a new release is available.\n\nIf the user clicks OK :\n- Android 7 and above: Downloads and installs the APK\n- Below Android 7 : Downloads the APK, the user has to go to the notifications to install it\n\nThe dialog isn't shown if the release doesn't have an APK.\n\n## Installation\n\n### Gradle dependencies\n\nAdd this in your gradle dependencies :\n```\nimplementation 'com.squareup.okhttp3:okhttp:4.6.0'\nimplementation 'com.squareup.moshi:moshi:1.9.3'\nimplementation 'com.squareup.okio:okio:2.8.0'\n```\n\n### Manifest\n\nIn the Manifest, add these permissions in the manifest tag :\n```xml\n\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n\u003cuses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\" /\u003e\n```\nAnd add this provider in the application tag :\n```xml\n\u003cprovider\n    android:name=\"androidx.core.content.FileProvider\"\n    android:authorities=\"${applicationId}.provider\"\n    android:exported=\"false\"\n    android:grantUriPermissions=\"true\"\u003e\n    \u003cmeta-data\n        android:name=\"android.support.FILE_PROVIDER_PATHS\"\n        android:resource=\"@xml/file_provider_paths\" /\u003e\n\u003c/provider\u003e\n```\n\n### Java\n\nAdd the entirety of the package `selfupdate`.\n\nIn the onCreate of your activity, add this to check if there is an update at the start of the application :\n\n```java\nif (savedInstanceState == null)\n    SelfUpdate.checkUpdate(this, \"burgyl\", \"SelfUpdatingApp\");\n```\n\nor this if you support API before 21 :\n\n```java\nif (savedInstanceState == null \u0026\u0026 Build.VERSION.SDK_INT \u003e= Build.VERSION_CODES.LOLLIPOP)\n    SelfUpdate.checkUpdate(this, \"burgyl\", \"SelfUpdatingApp\");\n```\n\nYou have to adapt the above username and repository.\n\n### Resources\n\nAdd the layouts for the dialogs :\n```\nlayout/content_dialog_download.xml\nlayout/content_dialog_show_update.xml\n```\n\nAdd the values :\n```\nvalues/dimens.xml\nvalues/strings.xml\n```\n\nAnd add the file provider paths :\n```\nxml/file_provider_paths.xml\n```\n\n## Licenses \u0026 Credits\n\n- [Moshi](https://github.com/square/moshi) by [Square Open Source](https://square.github.io/), licensed under the Apache 2.0 license\n- [OkHttp](https://github.com/square/okhttp) by [Square Open Source](https://square.github.io/), licensed under the Apache 2.0 license\n- [Okio](https://github.com/square/okio) by [Square Open Source](https://square.github.io/), licensed under the Apache 2.0 license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburgyl%2FSelfUpdatingApp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburgyl%2FSelfUpdatingApp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburgyl%2FSelfUpdatingApp/lists"}