{"id":13710397,"url":"https://github.com/angelinn/Xam.Plugin.AutoUpdate","last_synced_at":"2025-05-06T19:30:50.287Z","repository":{"id":46988141,"uuid":"154875135","full_name":"angelinn/Xam.Plugin.AutoUpdate","owner":"angelinn","description":"Xamarin Forms plugin that auto updates your Android or UWP sideloaded application.","archived":false,"fork":false,"pushed_at":"2023-11-05T15:47:05.000Z","size":2386,"stargazers_count":34,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-24T06:02:22.075Z","etag":null,"topics":["android","apk","appx","auto-update","forms","plugin","update","uwp","xamarin"],"latest_commit_sha":null,"homepage":"","language":"C#","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/angelinn.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":"2018-10-26T18:11:04.000Z","updated_at":"2025-01-23T06:36:54.000Z","dependencies_parsed_at":"2024-11-13T20:34:08.253Z","dependency_job_id":"e33859ec-ea11-4351-a1a9-50b948ad5c76","html_url":"https://github.com/angelinn/Xam.Plugin.AutoUpdate","commit_stats":null,"previous_names":["angelinn/xam.plugins.autoupdate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelinn%2FXam.Plugin.AutoUpdate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelinn%2FXam.Plugin.AutoUpdate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelinn%2FXam.Plugin.AutoUpdate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelinn%2FXam.Plugin.AutoUpdate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angelinn","download_url":"https://codeload.github.com/angelinn/Xam.Plugin.AutoUpdate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252753192,"owners_count":21798930,"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","apk","appx","auto-update","forms","plugin","update","uwp","xamarin"],"created_at":"2024-08-02T23:00:55.573Z","updated_at":"2025-05-06T19:30:50.270Z","avatar_url":"https://github.com/angelinn.png","language":"C#","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# Xam.Plugin.AutoUpdate\n## This library is not longer supported. If you need some functionality, PRs are accepted.\n\n## Auto update for your Android/UWP\n\n\u003cdiv class=\"inline-block\" \u003e\n  \u003cimg style=\"float: left;\" src=\"https://github.com/angelinn/Xam.Plugin.UpdatePrompt/blob/master/images/update_android.PNG\" alt=\"android\" width=\"220\"/\u003e\n  \u003cimg style=\"float: left;\" src=\"https://github.com/angelinn/Xam.Plugin.UpdatePrompt/blob/master/images/install_android.png\" alt=\"android\" width=\"220\"/\u003e\n  \u003cimg style=\"float: left;\" src=\"https://github.com/angelinn/Xam.Plugin.UpdatePrompt/blob/master/images/update_uwp.jpg\" alt=\"uwp\" width=\"220\"/\u003e\n    \u003cimg style=\"float: left;\" src=\"https://github.com/angelinn/Xam.Plugin.UpdatePrompt/blob/master/images/install_uwp.jpg\" alt=\"uwp\" width=\"220\"/\u003e\n\u003c/div\u003e\n\n## What is it?\n* Check for update and auto install sideloaded Android or UWP application\n* Check for update and redirect to play store\n* **The auto install part works only with UWP and Android**\n\n## How does it work?\n* Developer provides a check for updates function, returning if there is an update available and the url to the file, if provided\n* The plugin checks for updates every ```RunEvery``` period of time\n* When a new version is available and the user clicks the **confirm** button, the file from the provided url is downloaded and started\n\n## Installation\nNuget package will be available soon.\n\nInstall the package on the mobile projects in your solution (.netstandard, Android, UWP, iOS).\n\n## Android\nFor Android API \u003e **23** a ```FileProvider``` configuration is required:\n* Add to AndroidManifest\n```xml\n  \u003capplication android:label=\"...\"\u003e\n    \u003cprovider android:name=\"android.support.v4.content.FileProvider\" android:authorities=\"com.companyname.application\" android:grantUriPermissions=\"true\" android:exported=\"false\"\u003e\n      \u003cmeta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/file_paths\" /\u003e\n    \u003c/provider\u003e\n  \u003c/application\u003e\n```\n\n* Create a new file - ```Resources/xml/file_paths.xml```\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cpaths\u003e\n  \u003cfiles-path name=\"files\" path=\"/\" /\u003e\n\u003c/paths\u003e\n```\n\n* Add to ```MainActivity```\n\n```C#\nAutoUpdate.Init(this, authority);\n\n```\n\n**NOTE:** The authority value is the same as the **android:authorities** in the ```AndroidManifest``` file.\n\n**NOTE:** Since Android Oreo (API 27), every app needs additional access to install APKs. You *must* add this permission if you wish to support Oreo:\n```xml\n\u003cuses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\" /\u003e\n```\n\n\n## Usage\n\n* Create an ```UpdateManagerParameters``` option.\n* Use ```UpdateManager.Initialize(parameters, mode)``` somewhere in your forms project. (e.g in **App.xaml.cs**)\n\n```C#\nUpdateManagerParameters parameters = new UpdateManagerParameters\n{\n    Title = \"Update available\",\n    Message = \"A new version is available. Please update!\",\n    Confirm = \"Update\",\n    Cancel = \"Cancel\",\n    // choose how often to check when opening the app to avoid spamming the user every time\n    RunEvery = TimeSpan.FromDays(1),\n    CheckForUpdatesFunction = async () =\u003e\n    {\n        // check for updates from external url ...\n        return new UpdatesCheckResponse(true, downloadUrl);\n    }\n}\n```\n\nUse ```UpdateMode.AutoInstall``` to download and install the application\n```C#\nUpdateManager.Initialize(parameters, UpdateMode.AutoInstall);\n```\n\nor ```UpdateMode.OpenAppStore``` to open the corresponding app store\n```C#\nUpdateManager.Initialize(parameters, UpdateMode.OpenAppStore);\n```\n\n## Auto install\nUsing the auto install mode, the plugin will download the file provided in the **DownloadUrl** parameter and launch it as **apk** or **appxbundle**, depending on the platform.\n\n**Note:** As stated earlier, this option does not work with **iOS**, due to the restrictions of the operating system.\n\n## Open app store\nUsing the open app store mode, the plugin will open the specified platform's **app store**, if an update is available.\n\n**Note:** Additional logic is used for android to determine that only the **Google Play store** can open the ```market://``` url and no other app that has registered for it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelinn%2FXam.Plugin.AutoUpdate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangelinn%2FXam.Plugin.AutoUpdate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelinn%2FXam.Plugin.AutoUpdate/lists"}