question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`onPurchasesUpdated` received broadcast twice in a normal billing flow

See original GitHub issue

I noticed this issue starts to surface since two days ago. I am launching a normal billing flow with :

BillingFlowParams flowParams = BillingFlowParams.newBuilder().setSku(sku).setType(BillingClient.SkuType.INAPP).build();
billingClient.launchBillingFlow((Activity) context, flowParams);

When the billing flow is successful, we are notified through onPurchasesUpdated twice. When I debugged, I found that BillingBroadcastReceiver received two broadcasts and they have the same content (resultCode and Purchase). Previously, onPurchasesUpdated is only notified once.

Updating to the latest library : com.android.billingclient:billing:1.0 doesn’t resolve this issue. From the server logs, it seems like more and more user are encountering this issue.

I would like to verify if this is a change in Google Play Service? Or some buggy behaviour which the team is resolving? Since updating the newly released library doesn’t resolve the issue, do you recommend having a workaround on the client side? Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
isaidamiercommented, Aug 20, 2019

Apologies for the issues you are experiencing. Please file a ticket at https://issuetracker.google.com against component “Android Public Tracker > App Development > Google Play Billing Library”. Presently we are reserving Github for questions specifically about the samples so we can better serve you.

11reactions
dima-ostapovetscommented, Mar 5, 2018

Any update about this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

In App Purchase seems to be called multiple times
In the current version (1.0) of the Billing library, this happens because multiple broadcasts are being made by the system. For example, if...
Read more >
Integrate the Google Play Billing Library into your app
Here's a typical purchase flow for a one-time purchase or a subscription. ... This listener receives updates for all purchases in your app....
Read more >
In-app Purchasing with Google Play Billing Library - Medium
In this article, we are going to cover In App Purchases and see the process of integrating it in android apps. Let's get...
Read more >
Fix payment issues on your account - Android - Google Play ...
If you try to buy something on Google Play but your payment is declined or won't process, try the steps below. If you've...
Read more >
How to Implement In-App Purchases in Android?
We'll create an app as part of the process to help us learn how In-App purchases work. So, without further ado, let's get...
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