Closed devalexx closed 6 months ago
f-droid version is always behind so probably shouldn't use it. i was thinking something like this instead. using the github api: https://github.com/polymorphicshade/NewPipe/blob/sponsorblock/app/src/main/java/org/schabi/newpipe/NewVersionWorker.kt
with this url: https://api.github.com/repos/crackededed/xtra/releases/tags/latest
could compare asset updated_at timestamp for example. there's also a link for the apk. so could open that in a browser. also it probably wouldn't be too hard to just download and install the apk in xtra. it could be downloaded to internal storage with okhttp and then installed.
this check runs on every launch now so there should be a setting to change how often this is done. maybe could just have a setting where you input a number of days.
@crackededed will it be possible to add the real version number to the release page like here https://github.com/polymorphicshade/NewPipe/releases ? and it'd be even better to add the tag to the git commit. what do you think? or how do you suggest comparing by timestamp? how do I know the current one?
will it be possible to add the real version number to the release page
what if there's an update to only one of the versions? version number would have to be increased but then the other version will have an update with no changes.
how do you suggest comparing by timestamp?
current time from device or timestamp from latest release could be saved as a preference. when checking for updates just check if the latest timestamp is newer.
what do you mean by saying update to only one of the versions
? there is always only one latest version? it's the same like for NewPipe you mentioned. it's working there pretty well. why don't you want to go with a regular approach which other apps use?
current device timestamp won't work if user installs the old version apk after the new was released.
what do you mean by saying
update to only one of the versions
?
there's latest and the android 4 version.
I see, but it can be also easily customized per version. if I prepare a better GH workflow, will you consider to merge it?
I'd like to put version tags to git + make releases per version per platform (latest+4). or maybe just 1 release but with two artifacts. so it'll look like: v2.31.2 (latest): app-release.apk, app-release-api16.apk
1 release but with two artifacts.
but what if there's a fix that only applies to the android 4 version? it would need a new release. then the main version would get a new update with nothing changed
yeah, it makes sense to have separate release versions for api16, smth like 2.31.1-api16
. latest
(just 2.31.1
) will be always the master branch release and it'll be checked by https://api.github.com/repos/crackededed/xtra/releases/tags/latest
. for api16 we might not introduce this update feature or parse https://api.github.com/repos/crackededed/xtra/releases
looking for *-api16
versions.
btw is api16 still used? :) api21 is on 99.6% of the devices in the world according to the google statistics. and api16 is not even there anymore :D
i don't think i want to get rid of the other versions. there was a version using old exoplayer version because on some devices the video would lag on newer exoplayer versions. i think that was an issue for 8 months. so being able to create these other builds seems useful to me
As a user I want to be notified when the newer version is available, because it's not updated automatically via GPlay Store.
Is f-droid version source good enough? (https://f-droid.org/api/v1/packages/com.github.andreyasadchy.xtra)