-
Notifications
You must be signed in to change notification settings - Fork 18
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
In-App Updating Option (Closes #121) #133
base: master
Are you sure you want to change the base?
Conversation
Needs fine tuning
- Added constraint to button - Added version number showing top left in home screen - Added translation strings in updater instead of hardcoded strings - Added invisible text to indicate new version is available (for later use)
Finalized everything, could use simplifcation and tidying up in the future
|
||
val httpsURL = | ||
"https://raw.githubusercontent.com/leonardoxh/race-control-tv/master/app/build.gradle.kts" | ||
val myUrl = URL(httpsURL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this entire thing to a separate class like updateService
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also use coroutines to handle this network part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can do that.
I thought about planning it like this: Merging and publishing a new release with this current version of the updater so the users have a general update service, so they don't need to manually sideload the new version every time.
After this I'll open a new PR to refine the code and put them into another class and also convert the ThreadWorker to Coroutines. This then can be updated into another release when there are other significant changes to the app.
Do we wanna do it like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to put all of this in 1 PR.
Because this async task work and manual work seems like 2010 :D Also AsyncTask
is deprecated...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And second... As the app is pretty much dead (no live content yet) I'd say no rush on this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay so I have played around with Coroutines a bit and everything I try fails, so I need to do some research on this, since I only worked on small projects and with Async tasks so far. So this might take a while.
Hope that this will be implemented soon! |
I see the work with the async task still has to be done... Do you want me to take over this PR? I will probably have some time this weekend. |
@leonardoxh Yeah sure. |
Closes #121
Added Button to download latest version from this Repo and automatically install it. So basically updating it.
It does get the latest update from "https://github.com/leonardoxh/race-control-tv/releases/latest/download/app-release.apk".
It fetches the latest version from "https://github.com/leonardoxh/race-control-tv/blob/master/app/build.gradle.kts" (direct link here "https://raw.githubusercontent.com/leonardoxh/race-control-tv/master/app/build.gradle.kts").
So basically every time a new release comes out and build.gradle gets updated for the release, it shows a version mismatch and will show there's an update.
To do: