-
Notifications
You must be signed in to change notification settings - Fork 4
Updating
Starting with v0.2.2
, the app can check for updates and install them.
This page outlines some technical details on how updates are checked.
This page is based on v0.2.2
requirements! Newer versions may have different requirements!
By default, updates are checked by querying https://api.github.com/repos/damontecres/StashAppAndroidTV/releases/latest.
In advanced settings this URL can be changed. For example, changing to https://api.github.com/repos/damontecres/StashAppAndroidTV/releases/tags/develop will track the develop
tag for debug builds instead which is built from the main
branch.
The contents of an update URL require a few fields from the response schema of /repos/{owner}/{repo}/releases/latest
.
The name
field must be parseable by Version.fromString
. It is compared to the currently installed version to determine if there is an update available.
There must be an asset with name
equal to either StashAppAndroidTV.apk
or StashAppAndroidTV-debug.apk
.
So, a minimum example update response could be:
{
"name": "v0.2.2",
"published_at": "2024-03-30T00:00:00Z",
"body": "Optional, but recommended",
"assets": [
{
"name": "StashAppAndroidTV.apk",
"browser_download_url": "http://192.168.1.100:8000/StashAppAndroidTV.apk"
}
]
}
A version is made up of five components:
- Major version
- Minor version
- Patch version
- Number of commits since
v*
tag - Git hash (usually 7 characters) prefixed with
g
A stable release is always in the form of v<major>.<minor>.<patch>
such as v0.2.2
. The num_commits
and git hash are implicitly zero or null.
A develop build should be in the form of v<major>.<minor>.<patch>-<num_commits>-g<git_hash>
such as v0.2.3-5-g226e56d
.
When comparing version, all fields except the git hash are compared in order.
Android requires apps to be signed and doesn't permit upgrading to an apk that has a different signature.
All releases from damontecres/StashAppAndroidTV
(both stable & develop/debug builds) are signed with the same certificate. But switching to locally built version or another third party build will require deleting the app first.
See https://source.android.com/docs/security/features/apksigning for more details