stewag64 8 Posted February 25, 2022 (edited) I have developed a free application with Delphi 10.4.2 CE for both Android and iOS which is in both Google Play and App store for two years now. Older android phones though can not load the current version, as they are not compatible with latest SDK - and maybe other reasons. BUT: I observed that several smartphones, that are not compatible with the latest version, ARE compatible with an older version that I compiled with Delphi 10.3! The older version was compiled for API level 19+, the consecutive (incompatible) versions were compiled with API level 23+. Both target at SDK 29. I find this quite astonishing, as it means that a phone's hardware is not (always) the restricting part and therefore can be overcome. In order to make use of this, I want to give these older smartphone users the possibility to load and install the latest version of the app by means of a "backward-compatibility" .apk that they can download directly from my website. Therefore, I "downgraded" the SDK & NDK from 10.3 (on another machine) under 10.4.2. Still, the so compiled .apk can still not be installed on my older smartphone (which is the same one that CAN digest the earlier .apk I downloaded from my Google Play developer account). I was lucky to find these 10.3 SDK and NDK on an old image, as 10.3 CE had to be deleted when installing 10.4 CE. I presume that the idea of older-smartphone-participation might attract also others? Who can come up with a workable way to compile for older platforms with newer or latest Delphi? Edited February 25, 2022 by stewag64 Share this post Link to post
Guest Posted February 25, 2022 (edited) I don't know if I understood the Google translation correctly, however, it's worth mentioning that the android:targetSdkVersion="%targetSdkVersion%" parameter doesn't exactly determine which hardware will accept or reject a mobile software. This parameter just tells the Google platform what API (function library) is expected for the software to work as expected. In the same way that the android:minSdkVersion="%minSdkVersion%" parameter indicates the API version that is minimally expected to be contained in the hardware operating system. However, for reasons of control of the GooglePlay platform, these definitions are used to filter the software to be sent to certain smartphones. It is an arbitrary control of the platform, not the operating system on the hardware. However, the software may not run because it does not supply the necessary coding for that operating system. Just like when trying to run 64bit software on a 32bit operating system. In short, if the hardware has an operating system capable of supplying the functions for a given API, then the probability of running it will be high. To direct the compilation of standard code for several platforms, you should create "scripts" (Android uses scripts heavily under the hood) with the proper commands for each target platform. Including having the bookstores for each target edition. In Delphi code, you could use compiler directives to help; But of course there is software (TOOLS) for this task, otherwise it's an Android distribution without an automated system....but I don't know any. Edited February 25, 2022 by Guest Share this post Link to post
Dave Nottage 557 Posted February 25, 2022 1 hour ago, joaodanet2018 said: In the same way that the android:minSdkVersion="%minSdkVersion%" parameter indicates the API version that is minimally expected to be contained in the hardware operating system. That's one of the important factors determining the lowest version of Android that will run the app. In the case of native Android apps (such as built with Delphi), the other factor is the NDK settings, as mentioned in the "Important information about the NDK settings" section of this article: https://delphiworlds.com/2020/09/manual-android-sdk-ndk-install-delphi/ Share this post Link to post
stewag64 8 Posted February 27, 2022 Thanks, Dave, for pointing out the importance of NDK! I tried in vain with "android-19" configuration as mentioned in the article, but was successful when I generated a 32 Bit version. It could be installed by older devices that would not accept a 64 bit version. The major problem and cause seems to be the massively reduced device compatibility that I observed just now between Delphi 10.3.3 and 10.4.2: Share this post Link to post
stewag64 8 Posted March 1, 2022 My idea of generating a special compatibility .apk for older devices does not make sense and was caused by a substantial misunderstanding. See details here: Share this post Link to post