Questions tagged [android-billing]

Android In-app Billing is a Google Play service that lets you sell digital content from inside your applications.

You can use the service to sell a wide range of content, including downloadable content such as media files or photos, virtual content such as game levels or potions, premium services and features, and more. You can use In-app Billing to sell products as:

Standard in-app products (one-time billing), or

Subscriptions, (recurring, automated billing)

Useful links

475 questions
1
vote
1 answer

Issue on BillingClient.queryProductDetailsAsyn when call adapter.notifyDataSetChanged()

When I do adapter.notifyDataSetChanged() into onProductDetailsResponse it seems that the callback stays pending and the Recycleview doesn't show anything I'm upgrading the Google Play Billing Library on my app, form 3 highter, I've the same issue on…
1
vote
0 answers

Android In-app billing, How to determine whether to call consumeAsync or acknowledgePurchase?

I have implemented the Android in-app billing library version 5.0.0, there are multiple subscription products and in-app(consumable) products shown on the same screen for the user to purchase in my app. The onPurchasesUpdated listener is called…
1
vote
0 answers

When would there be multiple SKUs from Purchase.getSkus() when using BillingClient 4?

I am upgrading from BillingClient 3 to 4 as is required by Google now. In this change, there is a removal of the Product.getSku() and you are now supposed to use getSkus(). My question is, when will this be populated with more or less than one? It…
David
  • 1,648
  • 1
  • 16
  • 31
1
vote
0 answers

BillingClient isFeatureSupported returns SERVICE_DISCONNECTED

I'm working with the Google Billing Library Version 5. I've pretty much gotten my code to do the right thing. I tested it on hardware devices running API levels 16, 23, 28, and 32. Then I did a factory reset on the device running API level 23. …
Jerry Agin
  • 629
  • 1
  • 5
  • 15
1
vote
0 answers

Cannot resolve: PurchasesResult, queryPurchases, getPurchasesList

I'm trying to convert android billing version 3 to android billing version 5. But I have a problem in this function, I have no idea how to change it to make it work: @Override public void onBillingSetupFinished(@NonNull BillingResult…
RGS
  • 4,062
  • 4
  • 31
  • 67
1
vote
0 answers

Why is the subscription not updating correctly, Android?

I have two subscriptions in the application, each of them individually works correctly. But when I try to do an Update/Downgrade, problems arise: I have two subscriptions in the application, each of them individually works correctly. But when I try…
1
vote
2 answers

billing library 5 QueryPurchasesAsync always returns service disconnected

Migrating from Billing library 4.0 to 5.0, i am unable to check the purchase state. billingClient.queryPurchasesAsync(QueryPurchasesParams.newBuilder().setProductType(BillingClient.ProductType.INAPP).build(), new PurchasesResponseListener() { …
1
vote
0 answers

How to calculate discounts on in-app products

Recently I have implemented in-app purchases (subscriptions, more specifically) in my Android app. My initial idea was to have a month, a quarterly, and a yearly subscription, and make it clear to the user how much discount (compared to the monthly)…
1
vote
0 answers

BillingClient.startConnection(new BillingClientStateListener shows the Remote stack trace: at com.android.server.am.ActivityManagerServic

BillingClient.startConnection(new BillingClientStateListener shows the below error Remote stack trace: at com.android.server.am.ActivityManagerServic Caused by android.os.RemoteException Remote stack trace: at…
sejn
  • 2,040
  • 6
  • 28
  • 82
1
vote
1 answer

Android billing 4 returns wrong SkuDetails fields

I updated android billing library from v.3 to v.4.0 in December 2021. After some time in January 2022 my apps starts to receive SkuDetails without "description" field and with undocumented "name" field. I use description field in the app. What's bad…
1
vote
0 answers

Google Play Billing Library v4 verification of in-app purchases

I use Google Play Billing Library v4 for android app billing (implementation "com.android.billingclient:billing:4.0.0") I have not found any methods that can verify the purchase of a product by a user. If the user reinstalled the application, how…
1
vote
0 answers

Android, work out when the user purchased the app

Does anyone know using the Android BillingLibrary 4 if you can work out when the user purchased the app programatically within the app? Or how the app was installed / obtained via Promo code, paid or free?
Jake Wade
  • 571
  • 3
  • 19
1
vote
1 answer

Android app is getting killed when app is in background, results in failed in app purchase

below is the flow of the problem user tries to make some in-app purchases. the app launches google billing client activity which waits for users' payment responses. User minimizes my app and goes to third party payment apps ( in India- UPI apps )…
Dinesh Sen
  • 11
  • 1
1
vote
0 answers

DOMException: Payment app returned RESULT_CANCELED code. This is how payment apps can close their activity programmatically

Issue I'm trying to implement Google Play Billing on TWA using this Google Tutorial, but when I call const paymentResponse = await request.show(); the following error happens: DOMException: Payment app returned RESULT_CANCELED code. This is how…
1
vote
1 answer

Android Billing Subscription will not automatically renew

I am integrating the billing v3 subscription for my app, and billing client showing as This subscription will not automatically renew. I need it should be renew automatically.
egorkovv3
  • 51
  • 3