0

I am using the new Play Billing Library 1.0 in my Android app. After the purchase process is complete, in onPurchasesUpdated, I get the responseCode as an int from Google Play. How do I programmatically get the description for this responseCode in my app?

Is there is a better way than using a switch case and manually typing the descriptions? Is there was a method that returns the description?

khateeb
  • 5,265
  • 15
  • 58
  • 114

1 Answers1

0

How do I programmatically get the description for this responseCode in my app?

responseCode is BillingClient.BillingResponse

  • BILLING_UNAVAILABLE = 3
  • DEVELOPER_ERROR = 5
  • ERROR = 6
  • OK = 0
  • ....

see more info

Ethan Choi
  • 2,339
  • 18
  • 28
  • I know that. I was asking if there was a better way than using a switch case and manually typing the descriptions. If there was a method that would return the description. – khateeb Sep 26 '17 at 07:01