odysee-android icon indicating copy to clipboard operation
odysee-android copied to clipboard

Let user update the app

Open kekkyojin opened this issue 2 years ago • 2 comments

PR Checklist

Please check all that apply to this PR using "x":

  • [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • [x] I have checked that this PR does not introduce a breaking change

PR Type

What kind of change does this PR introduce?

  • [x] Feature

Fixes

Issue Number: #328

What is the current behavior?

For packages installed not from Play Store or FDroid, user needs to manually download the app and install it

What is the new behavior?

The app will show a snackbar when a new version is released, allowing user to install it

Notes

This PR requires that certain file exists on the update server. That file must be have a JSON format. The specification is documented on this PR code.

JSON file name and hosting can be changed. In order for this to be tested, I used my own web server, where I put a JSON file and an APK built from master branch but with a version code of 17.

To avoid accidental updates of the app while developing, the code will not run for DEBUG builds. In order to test this PR, you will need to comment out the corresponding code which checks for DEBUG builds.

New version code checking will run once every 24 hours, but user could still force the checking by quiting the app and restarting it.

kekkyojin avatar Sep 30 '22 13:09 kekkyojin

How is this expected to work?

After a new version is released -I mean, after version code has been increased-, JSON file must be updated with new version code and the new APK file published on the URL. The URL is not expected to change between releases.

kekkyojin avatar Oct 03 '22 16:10 kekkyojin

I see, that makes sense.

ktprograms avatar Oct 04 '22 00:10 ktprograms