Bilcan 0 Posted July 19, 2024 Hi, Is it possible to migrate an app at Delphi 11 to Google Play v6? Or do I need to upgrade my Delphi version 12.1? Thanks. Share this post Link to post
Dave Nottage 622 Posted July 19, 2024 3 hours ago, Bilcan said: Or do I need to upgrade my Delphi version 12.1? Looking at the differences in the source code for FMX.InAppPurchase.Android.pas between Delphi 11.3 and 12.1, I'd say yes. 1 Share this post Link to post
apachx 1 Posted 17 hours ago (edited) Hi. In my app, I'm using Google Play Billing Library version 6.0.0 (billing-6.0.1.dex.jar). But a few days ago, Google Play Console notified me that: Quote Your app uses an old version of Google Play Billing Library. Starting August 31, 2025, all apps must use version 7.0.0 or higher. Update to a newer version by the deadline, or your app updates will be rejected. Is it possible to migrate to Google Play Billing Library version 7.0.0 or newer in Delphi 12.1 CE? Has anyone already done this? I couldn't find anything useful on Google. Edited 17 hours ago by apachx Share this post Link to post
Dave Nottage 622 Posted 8 hours ago 8 hours ago, apachx said: Is it possible to migrate to Google Play Billing Library version 7.0.0 or newer in Delphi 12.1 CE? Possibly. Note that I am unsure as to whether the following will work, since I have not tested it. The steps are quite involved, so please take this into account before proceeding. In theory, the steps are to obtain the required .jar files, i.e. billing-7.0.0.jar play-services-base-18.3.0.jar play-services-basement-18.3.0.jar play-services-tasks-18.1.0.jar Which is the updated billing jar (of course), however the others are the versions of the jars that billing-7.0.0.jar is dependent on, of which Delphi 12.1 uses earlier versions. If you go to the Maven Repository site: https://mvnrepository.com/artifact/com.android.billingclient/billing/7.0.0 You can see the dependencies listed, as well as a link to the .aar file (which are in .zip format) that contains a classes.jar file that corresponds to billing-7.0.0.jar, i.e. you can rename the .aar to .zip, extract classes.jar and rename it to billing-7.0.0.jar. If you follow the links to the dependent jars (the links in the Version column of the dependencies list) - just the ones I have listed above, you can repeat the process of downloading the .aar, rename it to .zip, extract classes.jar and rename it to the relevant name. The next step would be to disable the "default" jars in Project Manager for your project, by navigating to Libraries node under the Android 32-bit target, right-clicking billing-6.0.1.dex.jar and clicking Disable, repeating this for play-services-base-18.1.0.dex.jar, play-services-basement-18.1.0.dex.jar and play-services-tasks-18.0.2.dex.jar, the repeat the process for the Android 64-bit target. Then, you would need to add the replacement jar files to the Android 32-bit target (they will not need to be added to Android 64-bit) by right-clicking the Libraries node, clicking Add, selecting the replacement jar files (listed above) and clicking OK. Next, you would need to edit the AndroidManifest.xml file in the project output folder (i.e. not AndroidManifest.template.xml), because Delphi 12.1 would be generating this line: (at least in theory - I do not have Delphi 12.1) <meta-data android:name="com.google.android.play.billingclient.version" android:value="6.0.1" /> Which will need to be changed to this: <meta-data android:name="com.google.android.play.billingclient.version" android:value="7.0.0" /> You would need to save this edited AndroidManifest.xml file somewhere convenient, perhaps in the root folder of your project. It needs to be added to the deployment of the project using Deployment Manager (Project | Deployment from the main menu in Delphi). You may note that there is an existing entry for the local name of AndroidManifest.xml. You will need to disable this existing entry by unchecking the checkbox, e.g: ..then add the modified version by clicking the button second from the left, and selecting the edited AndroidManifest.xml file. Note that if you later make any changes to your project that affect the Android manifest, you will need to repeat the manifest edit/copy steps. Hopefully, that should complete all the steps. Please remember the warning I made at the beginning 🙂 Share this post Link to post