Closed StevanWhite closed 23 hours ago
I have no plan to change the minSdk downwards in this case. But if you have it running, feel free to upload the apk (you need to nename it to .zip) here, so others can use it.
I'm not surprised tat you had no plan to do this. This is a request from an appreciative user.
I wouldn't call it a "downgrade". It is an expansion of your target users.
You have seen the changes. They refer to your existing code base, and are very limited in scope, and very easy to understand.
If you like, give me instructions, and I can push the changes to you.
Regarding an APK... wouldn't that need to be signed? By whom? Me?
I currently have 17 apps on F-Droid and do not want to increase my maintenance effort for old Android versions. You can upload a signed apk if you like.
You mean, I should sign an APK with my own certificate, and upload that?
My aim here was to reduce your load. I am offering to make changes for you.
yes, just upload the APK. That is zero effort for me.
The
minSdkVersion
is set to 29 (Android 10). That's like, just yesterday!For my purposes, I want API 24 (Android 7.0), which goes back 10 years. This can be achieved by just a few modifications.
(As far as the current libraries go, that could be dialed back to 21, but it would take a lot of work to get it running properly.)
API 34
Runs OK out of the box.
API 25
Best to first do a Code--> Inspect Code, which will show some errors concerning new function calls on old devices. The following explains how I dealt with them.
First problem in AdBlock.java, at the line
Replaced that line with
Next problem, in BannerBlock.java, at the line
Older versions of Java didn't have this nice
readAllBytes()
, but this will do:In BackupUnit.java, insert this static helper method:
and replace the line
with
In HelperUnit.java, all the
ShortcutManager.isRequestPinShortcutSupported()
stuff makes no sense on pre-Android 8 devices, so disabled it withLikewise, in NinjaWebView.java, calls to
and
are Android 8+, so disable those for earlier versions, the same way.
API 24
In BrowserUnit.java,
clearBookmark()
, likewise disable withI tested this, to the best of my abilities, on emulators and devices running Android 7.0, 7.1, and 7.1.1, as well as an emulator running Android 14, an a phone running Android 12. I saw no bugs, performing basic activities. In fact, it worked great!
Cheers!