[Android] Support for pending purchases must be enabled

See original GitHub issue

When call ConnectAsync(false) to disable pending purchases this cause an exception “Support for pending purchases must be enabled”.

Bug Information

Version Number of Plugin: 4.0.1-beta Device Tested On: Redmi 4X (Android 7.1.2) Simulator Tested On: N/A Version of VS: 2019 16.7.6 Version of Xamarin: 16.7.000.456

Steps to reproduce the Behavior

Just execute the ConnectAsync method with “enablePendingPurchased” parameters set to false.

Expected Behavior

Connection to billing service works with pending purchased not enabled.

Actual Behavior

Exception “Support for pending purchases must be enabled”

Code snippet

try
{
	var billing = CrossInAppBilling.Current;
	var connected = await billing.ConnectAsync(false);
}
catch (Exception exception)
{
}
finally
{
	await billing.DisconnectAsync();
}

Screenshotst

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zigcarrusecommented, Jan 11, 2021

+1 wanting the ability to turn off pending purchases

1reaction
rrispolicommented, Dec 11, 2020

Hello,

Do this: var connected = await billing.ConnectAsync(true);

Make sure you handle PendingPurchases…

Hi, with “true” enablePendingPurchased parameter I know that that it works, but I want to use with “false” to disable pending purchases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android billing how to enable enablePendingPurchases()
From the first stacktrace in your question. Enable this by calling 'enablePendingPurchases()'. we can find documentation for method ...
Read more >
BillingClient.Builder
Enables pending purchase support for one-time (in-app) items. This method is required to be called to acknowledge your application has been ...
Read more >
Support for pending purchases must be enabled. ...
Support for pending purchases must be enabled. Enable this by calling 'enablePendingPurchases()' on BillingClientBuilder. #137.
Read more >
Android billing how to enable enablePendingPurchases()
IllegalArgumentException: Support for pending purchases must be enabled. Enable this by calling 'enablePendingPurchases()' on BillingClientBuilder. at ...
Read more >
Implement Pending Purchases | In-App ...
To enable Pending Purchases, your app must call the PurchasingService.enablePendingPurchases() method at any point before initiating a purchase.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found