Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let user update the app #355

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Let user update the app #355

wants to merge 14 commits into from

Conversation

kekkyojin
Copy link
Collaborator

@kekkyojin kekkyojin commented Sep 30, 2022

PR Checklist

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

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

PR Type

What kind of change does this PR introduce?

  • 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 kekkyojin requested a review from akinwale September 30, 2022 13:29
Copy link
Collaborator

@ktprograms ktprograms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, but I think a few code changes would be good.

Please try to get it working on the foss build also (should just be putting the fileprovider in main/AndroidManifest.xml)

Can the APK also be deleted after updating?

Copy link
Collaborator

@ktprograms ktprograms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do these changes to the layout file do? (In f8c16ee)

@kekkyojin kekkyojin removed the request for review from akinwale October 3, 2022 15:27
@kekkyojin
Copy link
Collaborator Author

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.

@ktprograms
Copy link
Collaborator

I see, that makes sense.

@kekkyojin kekkyojin requested a review from akinwale October 11, 2022 17:34
@tzarebczan tzarebczan self-requested a review October 24, 2022 14:05
Copy link
Contributor

@akinwale akinwale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Can merge when it's ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants