Comments (16)
Are you confident this is true for all APKPure, Aptoide, and Uptodown apps? It is for the ones I checked, just making sure.
No, I just assumed that by checking many apps, I see no reason why wouldn't they use the real version name, since they are only hosting them.
At least we can try and see :)
from obtainium.
https://github.com/ImranR98/Obtainium/releases/tag/v0.14.22-beta
I'll update the comment above with this info so I can link to to explain version detection it in the future.
from obtainium.
can't it just extract the string from the system and compare it to the one indicated on the site?
That's where the problem is - the string that comes from the system is the real version string, while the string that comes from GitHub is just the Git tag for that release (for other sources it is similar - a string extracted from somewhere that uniquely identifies a release but isn't necessarily the exact version string for that release). Most developers use version strings as Git tags which is great, but some don't. Some do, but add extra info to the Git tag.
For example, you could have any of these cases among others:
- App version
0.14.21
but source saysv0.14.21-beta
(Obtainium) - App version
2.12.8-2+free
but source says2.12.8-2
(Cheogram) - App version
102.2.1-Release (12.5.6)
(really, that whole thing is the OS-reported "version") but source says nothing - no version string is provided by this HTML source so a URL hash is used instead as the release identifier (Tor) - App version
1
but source saysv10
(Quotable as described in this comment)
So there is no guarantee that the OS-provided "real" version will be in any way comparable to the source-provided "version" which really just needs to uniquely identify a release in order to enable update notifications - it doesn't need to be a real version string.
In most cases, where the strings seem to both conform to some standard format, like x.y.z
or x.y
, we can make the comparison - and this is when version detection is able to work. In some cases Obtainium can strip off extra parts from the source string if it would result in a standard version (like how v
and -beta
are removed from Obtainium's v0.14.21-beta
), then it can make the comparison. We never try to strip parts off the "real" version, so in the case of Cheogram above, the versions could not be resolved to a standard format.
This is how the various "standard" versions are generated: https://github.com/ImranR98/Obtainium/blob/main/lib/providers/apps_provider.dart#L64
It's always possible to expand this to add more support but we'd need to be careful (see #136 where there was a lot of trial and error figuring this out). For example if an app reports 1.2
but the source says 1.2-4
, should we strip off the number 4
and say the two are the same so no update? Right now, that wouldn't happen since we are only allowed to remove specific words and prefixes.
So in general if Obtainium can't resolve the differences between the two strings to a standard format, it disables version detection and hopes the user never has to update the app externally (in which case they would probably never notice the difference).
That's important to clarify - version detection is only relevant in 2 situations:
- If an app's version changes outside of Obtainium (for example if it gets updated by Google Play)
- If an attempt to silently update the app in the background fails
In those cases, version detection will allow Obtainium to detect that the app's real OS version has changed and update it's internal records accordingly, without generating a false update notification.
Note: For some sources, the source-provided string is guaranteed to be identical to the APK's real version string. For those sources, we skip all this version detection logic and just do a simple comparison. By default, all sources use the version detection logic, and "naive" version detection is enabled on a per-source basis (this means there may be some sources which don't use it right now, but could).
I'm not sure why you mentioned #941 though, I don't think version detection makes any difference there.
from obtainium.
Also I think I get how this relates to #941 now. Wouldn't fix the issue but would make sure the update would be retried later.
from obtainium.
I don't know how do you extract the version from F-Droid, but native version detection can be also used there because they don't change anything, although I don't use F-Droid but this will be helpful for a lot of people.
Examples:
Unitto
I hope you won't close the issue until we check all the sources and try to solve the problems once and for all.
You are the best, thank you.
from obtainium.
Feel free to re-open if needed.
from obtainium.
I acknowledge the GitHub version detection problems that's why I change the version name for some apps that I compile with GitHub Actions, an example would be my fork of Signal, also KeePassDX when he adds "beta" attached directly to the number.
But this rule of removing some suffixes and prefixes can be skipped entirely and just compare the strings from the system and the sites as they are, because they keep the version name as it is in the app, not like apps from GitHub.
Examples:
APKPure | Aptoide | Uptodown |
---|---|---|
I hope you'll make some changes that will make Obtainium compare them direcly without any changes and keep your method only for specific sites like GitHub.
from obtainium.
I hope you'll see this since I can't reopen the issue, but I will open a new one if I did not get a response.
from obtainium.
Are you confident this is true for all APKPure, Aptoide, and Uptodown apps? It is for the ones I checked, just making sure.
from obtainium.
Thank you so much, that was insanely fast.
I don't want to open another issue because my next suggestion is related to this one.
If you can just add a toggle for "use tag as version" in the version detection section and make Obtainium use the tag as provided by GitHub and GitLab without any changes and compare it directly to the version name provided by the system.
Situations where this option will be useful:
KeePassDX (GitHub)
Addy.io (GitLab)
And I can think of many scenarios where this option will be very useful and the old method will not detect the version very well.
from obtainium.
Related Issues (20)
- Give install permission popup on every new installed app HOT 2
- Change Backup Export Directory HOT 1
- How deal with github repo which uses tags? HOT 1
- Community HOT 2
- Add Steam Link to Steam App Source HOT 1
- APKPure: Installs the same version instead of the newer one when updating. HOT 5
- Ignoring add second repo and error ID apps HOT 6
- [Request] Can add it to the online translation platforms?(可以添加到线翻译平台吗?) HOT 17
- Cancel download
- Question: Why can't we download from APKMirror HOT 1
- Update apks
- HTML Souce - Lack of Docs! Help! HOT 6
- Forbidden when trying to add HTML source HOT 2
- Update icons HOT 2
- "Forbidden" error with app on apkmirror HOT 2
- Checking 'Changes' that doesn't have description opens in browser HOT 1
- Error: HandshakeException HOT 3
- Can't download from Uptodown HOT 2
- Parallelize refresh work HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obtainium.