12

I am using Google's In-app Billing. (version 2.2.0)

I start billing connection using below code in application class:

billingClient = BillingClient.newBuilder(Application.getInstance()).setListener(this).enablePendingPurchases().build()
billingClient.startConnection(this)

Billing service gets successfully connected using above code.

But I am observing an issue in market where onBillingServiceDisconnected() is getting called multiple times within a few seconds. As per our inhouse analytics, ~13% of our users have got 2 or more onBillingServiceDisconnected() calls within 5 seconds. As suggested by Google documentation, I try to reconnect the service inside onBillingServiceDisconnected() using billingClient.startConnection(this), after which service gets connected again, but then again it gets disconnected.

What could be the reason behind such frequent service disconnections for so many users?

Would it be leading to payment issues as well?

Harminder Singh
  • 1,577
  • 1
  • 11
  • 19
  • 1
    The same thing happens to me. I have an app uploaded on Google Play Store and I upgraded the Google Billing Library to version 3.0. Starting with that moment, some of my users cannot purchase the products, the billing service keeps disconnecting so in Crashlytics I keep getting a lot of crashes saying that the "SKU cannot be null". I discovered that the SKU-s cannot be retrieved because the Google Billing Services keeps disconnecting. I tried to change different things in the Dev Console, in my code but the same thing happens. Have you found any solution to this problem? – Alexandru Dumitru Sep 29 '20 at 09:28
  • Did you ever determine the cause of this? – Eric Aug 28 '23 at 17:06

0 Answers0