stewag64 8 Posted February 27, 2022 (edited) I just observed that my Android app suffered a MASSIVE decrease of compatible devices after a new release with 10.4.2, compared to 10.3.3. Please see attached screenshots from Google Play's "Release Dashboard": App bundle 2.9.3.1 (compiled with Delphi 10.3.3. CE) was still compatible with 18.885 devices. 10 month later, I released an update with Delphi 10.4.2 CE which was only compatible with 6702 devices! Do you experience the same with your apps? Or what do you do to maintain device compatibility? Does SDK version has something to do with it? Please note also file size. In order to satisfy users, that could not install the newer versions, I compiled a 32 bit .apk and placed it on my website. It does the job but that cannot be the solution. Edited February 28, 2022 by stewag64 1 Share this post Link to post
philipp.hofmann 4 Posted February 28, 2022 You find two entries in AndroidManifest.xml (here with Delphi 11): <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="30" /> So you have to compare not only the targetSdkVersion but also the minSdkVersion. Perhaps this reduce the number. You can set minSdkVersion manually in the Delphi 10.4.2 to the same value as in the Delphi 10.3.3 version to compare the number of devices then. But you can´t be sure that the Delphi 10.4.2 APK-file is running on Android devices with a lower sdk as with the default Delphi 10.4.2 value. 1 Share this post Link to post
Dave Nottage 557 Posted February 28, 2022 On 2/28/2022 at 3:00 AM, stewag64 said: Or what do you do to maintain device compatibility? Change the %minSdkVersion% value in AndroidManifest.template.xml to something lower than 23 but not lower than 19 (Android 4.4). You'll also need to ensure that the NDK settings are also changed, as per the "Important information about the NDK settings" section in this article: https://delphiworlds.com/2020/09/manual-android-sdk-ndk-install-delphi/. Note that if you target API level 19, projects containing any datasnap components (eg TClientDataset) will not compile. 2 Share this post Link to post
stewag64 8 Posted March 1, 2022 (edited) Thank you, Dave! Changing %minSdkVersion% value in AndroidManifest.template.xml in combination with adapting NDK settings as per your (quoted) article increased the number of supported devices greatly! I tried platform android-19 fist, but that threw an error, so I settled with android-21. It should be stressed that changing only %minSdkVersion%, as suggested by Philipp, does not do the job, as this "fakes" an environment which strictly doesn't exist. My substantial main error though was, that I deleted target platform Android 32 bit from project manager in app version 2.10, caused by my misunderstanding of Google's policy, that apps have to support 64 bit from last August on. That does NOT mean, that app bundles should not also include a 32 bit package! Older devices obviously only accept 32 bit apps. Now, with re-installed Android 32 platform and android-21 NDK platform settings, I am back to 17.463 devices. 🙂 Edited March 1, 2022 by stewag64 2 Share this post Link to post
dataol 2 Posted March 15, 2022 Same problem with Delphi 11. I tried to apply the suggested steps, but it doesn't return to 17,463 devices. Share this post Link to post
dataol 2 Posted March 15, 2022 1 hour ago, stewag64 said: How many devices? 7.199 devices ☹ Share this post Link to post
Dave Nottage 557 Posted March 15, 2022 9 hours ago, dataol said: I tried to apply the suggested steps, but it doesn't return to 17,463 devices I've extracted the steps from the article into this: https://github.com/DelphiWorlds/HowTo/tree/main/Solutions/AndroidLowerVersions Can you confirm you've followed the steps exactly? Check that the generated AndroidManifest.xml has the correct value for minSdkVersion, and perhaps post a screenshot here of your NDK settings. 1 Share this post Link to post
stewag64 8 Posted March 16, 2022 ... and make sure your app bundle includes both 64 AND 32 bit platforms. 1 Share this post Link to post
dataol 2 Posted March 16, 2022 1 hour ago, stewag64 said: ... and make sure your app bundle includes both 64 AND 32 bit platforms. I am in Delphi 11.1 Do I have to generate the aab using the 64 or 32 bit profile? I am using 64 and it doesnt includes 2 platforms. Dave, the manifest was generated with correct mininal version (19) Share this post Link to post
stewag64 8 Posted March 16, 2022 Yes, you need also 32bit platform in order to target older devices. 1 Share this post Link to post
dataol 2 Posted March 16, 2022 2 hours ago, stewag64 said: Yes, you need also 32bit platform in order to target older devices. Ok, but which platform should I select when compiling the project (Android 32 or 64 bit). Share this post Link to post
stewag64 8 Posted March 16, 2022 64 Bit. When compiling for the store, Delphi automatically creates a bundle (.aab) that includes also the 32 bit version, if exists. 1 Share this post Link to post
dataol 2 Posted March 16, 2022 14 hours ago, Dave Nottage said: I've extracted the steps from the article into this: https://github.com/DelphiWorlds/HowTo/tree/main/Solutions/AndroidLowerVersions Can you confirm you've followed the steps exactly? Check that the generated AndroidManifest.xml has the correct value for minSdkVersion, and perhaps post a screenshot here of your NDK settings. Share this post Link to post
dataol 2 Posted March 16, 2022 Solved by enabling project option in screenshot! Now 18.824 devices. Thanks!!! 1 Share this post Link to post
stewag64 8 Posted March 17, 2022 I thought this flag would be checked by default since 10.4. It wasn't? 1 Share this post Link to post
dataol 2 Posted March 17, 2022 4 hours ago, stewag64 said: I thought this flag would be checked by default since 10.4. It wasn't? I tested a new project in Delphi 11.1 and it was not checked. Share this post Link to post