tauri-plugin-android-update
A Tauri plugin that surfaces new GitHub releases for manual download on
platforms where tauri-plugin-updater cannot be used.
tauri-plugin-updater does not support Android, where apps must not
self-install (Google Play Store regulations). This plugin fills that gap with
its own check / download_and_install commands, modeled on the
tauri-plugin-updater command names, backed by the latest.json update
manifest that the release workflow publishes: the Tauri bundler generates it
via createUpdaterArtifacts, and tauri-apps/tauri-action attaches it
(signed with the updater signing key configured in the workflow) to each
GitHub release. Instead of downloading and installing, download_and_install
opens the release page in the default browser so the user can install
manually.
Quick Start
Add the plugin to your src-tauri/Cargo.toml:
[]
= "0.1"
= "2"
Register it where you do not use tauri-plugin-updater, e.g. on mobile, and
grant the plugin's default permission in your app's capabilities so the
frontend can invoke its commands:
.plugin
The URLs are derived from the owner/repo pair. To point the update check
at a custom latest.json manifest (or to open a different release page),
provide the URLs explicitly instead:
new
.latest_json_url
.releases_url
.build
Commands
The plugin registers its commands under the plugin:android-update| namespace,
so the frontend invokes them as plugin:android-update|check and
plugin:android-update|download_and_install. The command names mirror the
tauri-plugin-updater plugin's, but the payloads are this plugin's own — the
tauri-plugin-updater JavaScript API does not exist on these platforms, so the
frontend invokes them directly:
check— fetches thelatest.jsonupdate manifest from the latest release, compares its version against the installed one, and resolves to the update metadata ({ version, currentVersion }) when a newer release exists, ornullwhen the app is up to date. A newer release is also stored as the pending update fordownload_and_install.download_and_install— opens the release page for the pending update in the default browser, where the user can download the new version manually. Errors when no update is pending (i.e.checkfound nothing or has not run).
How it works
The plugin manages its own pending-update state, so no additional .manage()
is required.
License
MIT-0