ApkTrack
ApkTrack copied to clipboard
F-Droid use current (recommended) version
You should use the current recommended version for F-Droid, as there could be some versions available for manual installation, that are not recommended and are also not supplied by F-Droid as available updates.
For example AFWall+ has an alpha verseion available, but it is not recommended, so it is not supplied as available update, but within the application details to be installed manually. ApkTrack says, that AFWall is not up to date and there is an new version available.
The current version can be found on the application page: https://f-droid.org/wiki/page/dev.ukanth.ufirewall#Versions
In the string: The current (recommended) version is 1.3.4.1 (version code 171).
The download is available at: https://f-droid.org/repo/dev.ukanth.ufirewall_171.apk where the version code is used.
I have created an updated section for the sources.json, but I'm not sure if and how the version code can be supplied to the download string. It should be an common way, that don't need an custom hardcoded way for this repo.
{
"name": "F-Droid",
"version_check_url": "https://f-droid.org/wiki/page/%1$s",
"download_url": "https://f-droid.org/repo/%2$s_%1$s.apk",
"version_check_regexp": "<p>The current \(recommended\) version is ([^\s]+?) \(version code ([^\s]+?)\)\.\n</p>"
}
Thank you for noticing this.
I had plans to stop scraping the F-Droid website, and use the XML file used by their app instead. It offers a <marketversion>
tag which is easy to detect and corresponds to the latest stable release. This will be fixed in the next version.
The automatic download URL you propose can not currently be used, because the version code isn't scraped from the page and therefore cannot be re-used in the code. I notice that your regexp captures the version code, but in the download URL, %1$s
is always the version number (i.e. 1.3.4.1).
I plan on allowing regular expressions to create the download URLs in the future.
The automatic download URL you propose can not currently be used, because the version code isn't scraped from the page and therefore cannot be re-used in the code.
With my my regex it is scraped, but can't be used.
I notice that your regexp captures the version code, but in the download URL, %1$s is always the version number (i.e. 1.3.4.1).
I know that it couldn't work and used this reference only, because I didn't know what else.
I will rework this part, but not before some ongoing issues I'm currently working on :)
With little things I can help, but I'm definitively no Android guru. But before I have to look deeper into the source and find some free time.
You're already doing a lot! I'm short on free time as well, so don't take it as a sign of disinterest if I don't fix everything you report right away!