toufik 2 Posted May 3, 2023 (edited) hi all When i use the Google Play In-app Billing service in my app i did tried to upload it i did get this message i'm using delphi 11.3 ce ,thank you ... Edited May 3, 2023 by toufik Share this post Link to post
Patrick PREMARTIN 74 Posted May 4, 2023 (edited) did you initialized Android libraries dependencies in your project (from project manager / platform / android / library and contextual menu) ? (the SDK changed in 11.0 and in 11.2) Edited May 4, 2023 by Patrick PREMARTIN 1 Share this post Link to post
toufik 2 Posted May 7, 2023 (edited) On 5/4/2023 at 7:52 AM, Patrick PREMARTIN said: did you initialized Android libraries dependencies in your project (from project manager / platform / android / library and contextual menu) ? (the SDK changed in 11.0 and in 11.2) as you can see all the library there but say billing library is 4.0.0 wish mean that google needed 5 and up how to update it ? and i added <uses-permission android:name="com.android.vending.BILLING" /> to the AndroidManifest.template.xml file and this line to uses FMX.InAppPurchase Edited May 7, 2023 by toufik Share this post Link to post
toufik 2 Posted May 7, 2023 maybe this can help someone Potential fix for out-... | Unofficial RAD Studio Documentation (code-kungfu.com) the app got accpted in the google play store with no warning... i just need to update the code somehow 1 Share this post Link to post
Dave Nottage 557 Posted May 7, 2023 (edited) 4 minutes ago, toufik said: i just need to update the code somehow Genuine question: Which code do you think you need to update, and why? To support subscriptions (which apparently are new in v5), or something else? Edited May 7, 2023 by Dave Nottage Share this post Link to post
toufik 2 Posted May 8, 2023 4 minutes ago, Dave Nottage said: Genuine question: Which code do you think you need to update, and why? To support subscriptions (which apparently are new in v5), or something else? I'm trying to implement one time pruchase (i'm making a paid app ) so i did finish the code using belling v 4 i did not test it yet , i can share it so i do not know at all how handle the new update . uses FMX.InAppPurchase types procedure InAppPurchaseSetupComplete(Sender: TObject); procedure InAppPurchaseProductsRequestResponse(Sender: TObject; const Products: TIAPProductList; const InvalidProductIDs: TStrings); // procedure InAppPurchaseError(Sender: TObject; // FailureKind: TFailureKind; const ErrorMessage: string); procedure InAppPurchasePurchaseCompleted(Sender: TObject; const ProductID: string; NewTransaction: Boolean); const Nodemotrail = 'com.********.nameappid'; var FProductIsValid: Boolean; var fisPurchased :Boolean; procedure TFormMain.FormCreate(Sender: TObject); begin {$IFDEF ANDROID} InAppPurchase1.ApplicationLicenseKey := 'LicenseKey part1'+ 'LicenseKey part2'; InAppPurchase1.ProductIDs.Add(Nodemotrail); InAppPurchase1.OnSetupComplete := InAppPurchaseSetupComplete; {$ENDIF} procedure TFormMain.InAppPurchaseProductsRequestResponse(Sender: TObject; const Products: TIAPProductList; const InvalidProductIDs: TStrings); var Product: TProduct; begin fisPurchased := false; for Product in Products do begin if Nodemotrail = Product.ProductID then begin FProductIsValid := True; if InAppPurchase1.IsProductPurchased(Nodemotrail) then begin fisPurchased := true; // PURCHASED! end end; end; end; procedure TFormMain.InAppPurchasePurchaseCompleted(Sender: TObject; const ProductID: string; NewTransaction: Boolean); begin ShowMessage('La version professionnelle activée'); fisPurchased := True end; procedure TFormMain.InAppPurchaseSetupComplete(Sender: TObject); begin fisPurchased := False; try InAppPurchase1.QueryProducts; except on E:Exception do ShowMessage(e.Message); end; end; function TFormMain.Purchase(const ProductId: string): Boolean; begin Result := False; {$IFDEF ANDROID} if InAppPurchase1.IsSetupComplete and InAppPurchase1.CanMakeInAppPurchases then begin InAppPurchase1.PurchaseProduct(ProductId); Result := True; end else ShowMessage('Purchase not possibl now try later'); {$ENDIF} end; procedure TFormMain.btn7Click(Sender: TObject); begin // User is not registered yet or trial period has expired, proceed with purchase if Purchase(NoAdsId) then begin // Purchase successful ..... Share this post Link to post
Dave Nottage 557 Posted May 8, 2023 3 minutes ago, toufik said: i did not test it yet Can you test it, and report what problems you have with it, if any? 1 Share this post Link to post
Dave Nottage 557 Posted May 8, 2023 8 hours ago, Dave Nottage said: To support subscriptions (which apparently are new in v5), or something else? I've since seen your reply on Facebook, which indicates you're interested in the new features. I'll take a look into what changes might be possible, however it would be at least later in the week. Share this post Link to post
toufik 2 Posted May 8, 2023 1 hour ago, Dave Nottage said: I've since seen your reply on Facebook, which indicates you're interested in the new features. I'll take a look into what changes might be possible, however it would be at least later in the week. i read that the new library come with some few new properties change i'm looking to it. Google Play Billing Library 4 to 5 Migration Guide | Google Play's billing system | Android Developers 1 Share this post Link to post