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

How to use the test user's account for real purchase when the app is in production for puchasing the same product?

I have developed an app with billing purchase. I have list of test user account in google play console and I can purchase as a test user(alpha release). Everything is fine in test purchase. Now I have released the app in production. I want to…
Grace Venkat
  • 189
  • 1
  • 10
1
vote
2 answers

How to Change my free app with in-app purchase to paid app android?

Already I am having a free Android app with the in-app purchase in Google play store. Now as per our requirement I want to change it to a paid app. But somewhere I found that a free Android app with in-app purchase cannot be changed to paid app…
Rahul Bh
  • 123
  • 2
  • 15
1
vote
1 answer

Why developerPayload field is empty when querying Purchases.subscriptions resource?

I'm implementing in-app subscriptions using Google Play Billing Library. Everything works fine except one think, when I acknowledge purchase I set the developerPayload to some string value. Then I can see this value when querying purchases inside…
Bink
  • 21
  • 3
1
vote
3 answers

App doesn't connect to license service correctly after the update of Android Billing Library to latest 2.0

I have updated Android Billing library to version 2.0 (released this month). In addition to minor changes (that is useless to report here) I have edited this line to support the new library version: cl =…
AndreaF
  • 11,975
  • 27
  • 102
  • 168
1
vote
2 answers

Android in app billing currency code is always USD

I am trying to use the getSkuDetails() method to get the currency code: https://developer.android.com/google/play/billing/billing_reference. However the privacy_currency_code is always USD. I tried to things: (1) VPN to another country from my PC…
darklord
  • 5,077
  • 12
  • 40
  • 65
1
vote
0 answers

In-App billing v3, getPurchases() and android.test.purchased

Presumably after xx.may.2019 method getPurchases() stopped returning the test item "android.test.purchased". Just stopped working, that's all. The client code has not changed. This behavior is observed on the three test devices. Attempts were made…
1
vote
0 answers

Unable to consume android.test.purchased sku, Getting response code 6 from BillingResult

I'm unable to consume the android.test.purchased product id. Below is my code where I'm handling the purchase. public void handlePurchase(Purchase purchase) { try { if (purchase.getPurchaseState() == Purchase.PurchaseState.PURCHASED) { …
Sid
  • 327
  • 1
  • 2
  • 13
1
vote
1 answer

How to end android Subscription when a certain condition is met?

I have a dictionary android app where a user purchases a subscription after the user queries a certain number of words suppose say 1000, I want the subscription to end, do I need a server to verify this? google play console does not seem to have…
1
vote
1 answer

How to change the mode of trial purchases to real purchases in Android inApp billing?

I have my app with InApp Billing and I'm using Android In-App Billing v3 in billing mode billing works well, but I do not know how to go into production mode and make real purchases. my code is the following: protected void onCreate(Bundle…
1
vote
1 answer

How to get purchaseHistory for IAPs with BillingClient

As the documentation says: queryPurchaseHistoryAsync(): Returns the most recent purchase made by the user for each SKU, even if that purchase is expired, canceled, or consumed. So lets say I would like to make an IAP for the user to remove Ads…
Adam Varhegyi
  • 11,307
  • 33
  • 124
  • 222
1
vote
1 answer

BillingFlowParams in Google In App Billing unable to start biling using real sku

i have written these code which for sure fetching the skus from api, becoz its printing in log the fetched skus, but when i am setting the sku using .setSku() OR .setType() OR even directly .setSkuDetails() still the billingFlowParams isnt getting…
1
vote
1 answer

Google Play Billing > Verify a purchase on a device > obfuscate with ProGuard

I wonder is the document put a wrong (opposite) meaning to use ProGuard? Source: https://developer.android.com/google/play/billing/billing_library_overview But my understanding is: I MUST NOT add this line into the ProGuard configuration file,…
Amos
  • 2,222
  • 1
  • 26
  • 42
1
vote
1 answer

Format currency in Android like SkuDetails' getPrice method

I'm trying to convert a float number to a currency string in a similar format returned by SkuDetail's getPrice method, for reference it returns a string like this 1 234,56 Ft I've tried NumberFormat format = NumberFormat.getCurrencyInstance(); …
kviktor
  • 1,076
  • 1
  • 12
  • 26
1
vote
1 answer

Buying multiple consumable in app items at the same time

Is it possible to purchase the same item, multiple times? Let's say the user want to buy 200 coins through an in app purchase. Do I have to have two different managed products to let users buy 100 and 200 coins. Or Can I simply multiple the 100…
B.Cakir
  • 567
  • 1
  • 5
  • 19
1
vote
1 answer

Libgdx and Google Play Billing

I am using Libgdx + Android Studio and trying to implement Google Play Billing. I follow the instructions from here. I modify my dependencies as it is shown in te example: dependencies { ... implementation…