Jump to content
toufik

D11,unsupported version of Play billing

Recommended Posts

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 ...

 

344748267_3407942972857477_1120684993656582064_n.jpg

Edited by toufik

Share this post


Link to post

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 by Patrick PREMARTIN
  • Like 1

Share this post


Link to post
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 

Capture d’écran 2023-05-07 163824.png

 

Capture d’écran 2023-05-07 180203.png

Capture d’écran 2023-05-07 180228.png

Capture d’écran 2023-05-07 180244.png

Capture d’écran 2023-05-07 180339.png

Edited by toufik

Share this post


Link to post
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 by Dave Nottage

Share this post


Link to post
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
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?

  • Like 1

Share this post


Link to post
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
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

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×