-
Content Count
18 -
Joined
-
Last visited
Everything posted by apachx
-
Targeting both Windows 10 and Windows 11 in appxManifest.xml
apachx posted a topic in Delphi IDE and APIs
I'm developing a Windows application using Delphi 12.1 CE. In my current appxmanifest.xml, I have the following line: <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" /> As far as I understand, this targets Windows 10 only (max version 10.0.19041.0 => Windows 10 May 2020 Update). I want to make sure my app is officially recognized as compatible with both Windows 10 and Windows 11 in the Microsoft Store. To target max version Windows 11 23H2, is it enough to simply change the line to: <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22631.0" /> Will this be sufficient for the Microsoft Store to treat my app as compatible with both Windows 10 and Windows 11? Thanks in advance! -
Targeting both Windows 10 and Windows 11 in appxManifest.xml
apachx replied to apachx's topic in Delphi IDE and APIs
Looks like it worked - I can see on partner.microsoft.com that the app is available for both Windows 10 and 11. -
Wow, thank you! I'll try it out. Upd: I followed all the steps exactly as you described. The project compiled without any issues, and I’ve already published it on the Play Store. I tested the in-app subscriptions using a test account - everything works perfectly, no issues noticed. Now I'll wait and see if Google approves the changes. Great tutorial - simple and very clear. Thanks again!
-
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: 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.
-
Targeting both Windows 10 and Windows 11 in appxManifest.xml
apachx replied to apachx's topic in Delphi IDE and APIs
No, I haven't tested this hypothesis in the Microsoft Store yet. The default line in the AppxManifest.template.xml file looks like this: <TargetDeviceFamily Name="Windows.Desktop" MinVersion="%minVersion%" MaxVersionTested="%maxVersionTested%" /> But for some reason, it ends up generating the following in the final manifest: <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" /> This seems odd, considering that Embarcadero says Delphi 12 supports Windows 11 provisioning. That's why I wanted to ask here first — in case there are any hidden pitfalls I should be aware of. -
Advice on debugging Windows Store app while minimising submissions
apachx replied to Eric58's topic in General Help
It only worked for me after I right-clicked on my .msix file, opened its Properties, went to Digital Signatures → Details, and installed the certificate into two stores: Trusted Root Certification Authorities and Trusted Publishers - not for the current user, but for the local machine. But I still can't test the add-ons functionality locally in my app, because it isn't recognized as purchased from the Microsoft Store: WindowsStore1.AppProducts.Count is always 0 and WindowsStore1.AppLicense.IsActive is false. -
In App Purchase (consumable and subscription)
apachx replied to Joe Sansalone's topic in Cross-platform
You're absolutely right - my bad. -
In App Purchase (consumable and subscription)
apachx replied to Joe Sansalone's topic in Cross-platform
Yes, at first I tried calling InAppPurchase.RestorePurchasedProducts instead of InAppPurchase.QueryProducts, but the event InAppPurchasePurchaseRestored(Sender: TObject; const ProductID: string; const Receipt: string) on Android never fires. Here’s its implementation in FMX.InAppPurchase.Android.pas: procedure TAndroidInAppPurchaseService.RestorePurchasedProducts; begin CheckApplicationLicenseKey; // On Android the restore functionality is irrelevant thanks to the inventory // system automatically identifying which products have been purchased end; As for InAppPurchase.QueryPurchases — this method is not available for direct use in TInAppPurchase. -
In App Purchase (consumable and subscription)
apachx replied to Joe Sansalone's topic in Cross-platform
Hi. I just tried your solution, but it seems it's not working. After successfully completing a subscription, every attempt to call InAppPurchase.QueryProducts fails to return my subscription in the Products list within the event InAppPurchaseProductsRequestResponse(Sender: TObject; const Products: TIAPProductList; const InvalidProductIDs: TStrings). This condition never evaluates to true: for Product in Products do begin if (Product.ProductID = PlayMarketProductID) and (InAppSubscription.IsProductPurchased(PlayMarketProductID)) then SUBSCRIPTION := true; end; If I revert back to the original FMX.InAppPurchase.Android.pas, everything works as before. -
In App Purchase (consumable and subscription)
apachx replied to Joe Sansalone's topic in Cross-platform
Just in case, this limitation of the TInAppPurchase component has already been reported in a ticket on the Embarcadero Quality Portal - https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-3516. Who knows - maybe the developers will eventually do something about it. -
In App Purchase (consumable and subscription)
apachx replied to Joe Sansalone's topic in Cross-platform
This method doesn’t work for Delphi 12.1. But the good news is that subscriptions will still work without the need to edit any files, as suggested in that tutorial. The bad news, however, is that TInAppPurchase does not support the current version of the Google Billing API. It doesn’t understand multiple base plans (e.g., monthly and yearly) under the same subscription, nor does it recognize offers (such as discounts or trial periods) associated with those base plans. The component only detects the first base plan of a subscription marked as "Backwards Compatible" in Google Play. Now I understand why Delphi is rarely used for mobile app development - the delay in supporting newer Android versions and essential third-party APIs is unacceptable for business use. -
In App Purchase (consumable and subscription)
apachx replied to Joe Sansalone's topic in Cross-platform
Hi everyone, I’m implementing subscription functionality in my mobile app using Google Play Billing and TInAppPurchase in Delphi. I’ve encountered an issue that I hope someone here might have already faced and solved. When a user cancels a subscription, and the previously paid period fully expires, I expect that the app would stop recognizing the subscription as active. However, even after calling: InAppPurchase.SetupInAppPurchase; InAppPurchase.QueryProducts; …the subscription still appears active in the app — InAppPurchase.IsProductPurchased(PlayMarketProductID) continues to return true. But if I restart the app, the same method correctly returns false, and the subscription is no longer shown as active. This leads me to believe that either the TInAppPurchase component or the underlying Google Billing client caches the subscription status, and that cache isn't invalidated until app restart. 👉 Is there a way to force-refresh the current subscription state without restarting the app, after the subscription has been cancelled and fully expired? Thanks in advance! -
In App Purchase (consumable and subscription)
apachx replied to Joe Sansalone's topic in Cross-platform
And what? The same article for RAD Studio Athens: https://docwiki.embarcadero.com/RADStudio/Athens/en/Using_the_Google_Play_In-app_Billing_Service This page was last edited on 28 September 2015, at 14:19. Using the iOS In-App Purchase Service: https://docwiki.embarcadero.com/RADStudio/Athens/en/Using_the_iOS_In-App_Purchase_Service Note: Subscription-based types are not currently supported. This page was last edited on 21 January 2022, at 07:52. Is there any new tutorial about subscriptions? Where can I read more about it? -
In App Purchase (consumable and subscription)
apachx replied to Joe Sansalone's topic in Cross-platform
Hello! Could you please tell me if there have been any changes regarding support for subscriptions in mobile applications created with the latest versions of Delphi? I developed a mobile app for Android, published it on the Play Store, and now I want to add a subscription to this app — so users can pay, for example, $7 per month to use my app. That’s it. I am not selling any other digital content within the app. I am using Delphi 12 Version 29.0.52631.8427. Is it possible to implement such a subscription in my app? Because here: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_the_Google_Play_In-app_Billing_Service, it says: Note: Subscriptions are not currently supported. -
Hello. I encountered a similar issue, although the error code is slightly different. My mobile application works well on most devices, but today I installed it on a Motorola G54 smartphone, and upon launching, I saw a strange error: Cannot create EGL PBuffer Surface: error code 12291. It sometimes occurs on the splash screen, and sometimes when a MultiView menu appears. I was only able to get rid of the error after I stopped using third-party styles (in my case, it was the Android Sterling Style). This solution worked for me since I couldn't find much information about this error online.
-
Delphi 11, Android, deploy .db file, will not overwrite previous
apachx replied to Fudley's topic in FMX
Try this (don't forget to include the database file in the Deploy) : procedure TForm1.RefreshBD; var PackageName: JString; zip: TZipFile; begin PackageName := SharedActivityContext.getPackageResourcePath; if TFile.Exists(JStringToString(PackageName)) then begin TFile.Delete(TPath.GetHomePath + PathDelim + 'myDatabase.s3db'); zip := TZipFile.Create; zip.Open(JStringToString(PackageName), TZipMode.zmRead); zip.Extract('assets/internal/myDatabase.s3db', TPath.GetDocumentsPath, False); zip.Close; zip.free; end; end; -
Can you share a working sample of code? I get an access violation error when I try to do something like this (OnEnter event) => edit1.Visible := false; edit1.BeginUpdate; edit1.ControlType := TPresentedControl.TControlType.Platform; edit1.EndUpdate; edit1.Visible := true; The error occurs on line 997 of the FMX.Edit.Style.New unit: As a temporary working solution, for edit1 in the Object Inspector, I set ControlType = Styled, activated Touch => Gestures => Standard = [Left, Right], and wrote the following OnGesture event handler: if EventInfo.GestureID = sgiLeft then (Sender as TEdit).SelStart := (Sender as TEdit).SelStart + 3 else if EventInfo.GestureID = sgiRight then (Sender as TEdit).SelStart := (Sender as TEdit).SelStart - 3; Handled := True;
-
Delphi 11, Android, deploy .db file, will not overwrite previous
apachx replied to Fudley's topic in FMX
You can configure RAD Studio so that the Run Without Debugging and Run actions completely uninstall any previously-installed version of your application, including the data and cache folders. To do this, before installing the newer version, use the following steps: Select Run > Parameters. Enter -cleaninstall in the Parameters field.