Questions tagged [play-billing-library]

Anything specific to Google Play Billing library

Filter by
Sorted by
Tagged with
34votes
3answers
13kviews

queryPurchases() vs queryPurchaseHistoryAsync() in order to 'restore' functionality?

I'm using the Play Billing Library in order to trigger and manage purchases which in turn unlocked extra functionality within an app. This part is working. However, what is the best way to 'restore' ...
user avatar
  • 853
22votes
2answers
9kviews

BillingFlowParams.Builder setSkuDetails for testing static Google Play Billing responses

I'm testing in-app purchase using the three reserved product IDs for testing static Google Play Billing responses: android.test.purchased android.test.canceled android.test.item_unavailable However, ...
user avatar
  • 331
21votes
9answers
10kviews

Android Play Billing Library: onSkuDetailsResponse responseCode is 0, but the size of skuDetailsList is also 0

I'm now using the new Play Billing Library Basically, I followed the documentation to query available items to purchase SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder(); ...
user avatar
  • 305
16votes
3answers
8kviews

BillingClient always returns SERVICE_DISCONNECTED

So I have a billing client which I instantiate with billingClient = BillingClient.newBuilder(this).setListener(this).build(); I then call billingClient.startConnection(new ...
user avatar
  • 613
16votes
0answers
2kviews

Google Play In-app Billing API version is less than 3 with updated Play Store

I'm using the Google Play Billing Library to offer some in-app purchases in my app. Everything is working correctly, but I'm receiving the error "Google Play In-app Billing API version is less ...
user avatar
15votes
1answer
3kviews

Google Play Billing Library - querySkuDetailsAsync occasionally returns BillingResponseCode.ERROR (6)

I am using Google Play Billing Library 2.0.3 (implementation 'com.android.billingclient:billing:2.0.3') and it works fine for the most part, but for some users for the reasons unknown, ...
user avatar
  • 153
13votes
0answers
2kviews

billingClient.queryPurchases returns the list with already cancelled subsription

Steps to reproduce (test account): Complete subscription process in the app Cancel subscription in Play Store app and wait till it ends to completion (for monthly test subscriptions 5 minutes for the ...
user avatar
  • 853
13votes
0answers
834views

Play Billing Library - V3 vs Async vs Sync - different results

I have users that have purchased items (SkuType.INAPP) from my application. In the previously recommended implementation of in app billing the IabHelper.QueryInventoryFinishedListener would return an ...
user avatar
  • 5,914
12votes
2answers
4kviews

Android In-App Billing: Refunded in-app purchases not cancelled

I'm having a trouble with testing my in-app billing. (using Google Play In-app Billing Version 3 API) Problem: Refunded in-app purchases are still present in the purchase list, which is provided by ...
user avatar
11votes
2answers
5kviews

Get active subscriptions In-app Billing Android

I have used the In-app billing library for adding subscriptions in my app. Everything is working properly but I am unable to find how do I get a Users current active subscription? As per the docs, ...
user avatar
11votes
3answers
2kviews

TrivialDrive vs TrivialDrive V2?

Why are there two versions of TrivialDrive? https://github.com/googlesamples/android-play-billing Which version should be the main reference project for learning in-app billing? What's the ...
user avatar
10votes
1answer
2kviews

How to handle Purchase States with Purchase History Record in new Google In App Purchase

I am trying to create a restore purchase system. I want, the user can reach its bought products whichever device he/she logged in. So I use "queryPurchaseHistoryAsync()" method when app launches. My ...
user avatar
9votes
3answers
2kviews

BillingClient.BillingClientStateListener.onBillingSetupFinished is called multiple times

I tried to write a wrapper for BillingClient v.2.2.0 with Kotlin Coroutines: package com.cantalk.photopose.billing import android.app.Activity import android.content.Context import com.android....
user avatar
  • 686
9votes
2answers
757views

How to renew subscription manually using Play Billing Library?

I'm using Play Billing Library v1.0 for In-app Billing support in Android app and would like to allow users to renew a subscription manually during its active period to extend it by the appropriate ...
user avatar
9votes
1answer
2kviews

How to check the expiration for subscription items

QueryInventoryFinishedListener of IabHelper has not returned the expired subscription items. On the other hand, PurchaseHistoryResponseListener of Google Play Billing Library seems to receive all ...
user avatar
8votes
2answers
6kviews

Google play billing API: How to understand the user is subscribed?

I want to find out whether the user active subscription to Basic/Premium content or not from the MainActivity. There is a BillingClientLifecycle class initiating the subscription process. As I ...
user avatar
8votes
1answer
347views

Google Play Billing: Pending purchases not available for subscriptions?

Context: We have a TV app that offers as its only in-app item a monthly subscription. I am mostly looking for confirmation of what I believe to be true: Since version 2.0 of the Google Play Billing ...
user avatar
8votes
0answers
187views

Is implementing in-app-purchases for Android really this complex?

I'm about to implement In App Purchases (IAP) for a premium-upgrade feature in an app I'm developing, and I've read the official developer guides. There, they mention that You can use the Play ...
user avatar
  • 14.3k
7votes
2answers
3kviews

Android Billing 4.0.0 - No purchase result querySkuDetailsAsync()

I migrated Google Play Billing Library in Android Studio from 3.0.3 (was working fine) to 4.0.0. I've checked my Google Play Billing and all seems OK and the SKU status is ACTIVE (no red flags). I've ...
user avatar
7votes
1answer
342views

What "idiomatic Kotlin" does the library billing.ktx facilitate?

In researching answers for my question here I found (after several days of very frustrating work) references to the kotlin billing library "billing.ktx" which a couple of Developer pages ...
user avatar
  • 196
7votes
3answers
1kviews

Cannot upgrade android in-app subscription. Error: "Something went wrong on our end. Please try again."

Issue: Cannot upgrade current subscription to different subscription. Showing Error: "Something went wrong on our end. Please try again." Description: Were using play billing library v3.0....
user avatar
7votes
0answers
931views

Google Play Billing 2.0 testing pending transactions and acknowledgement

I'm transitioning to Google Play Billing library v2.0.0 and there are two major flow differences. One is purchase acknowledgment https://developer.android.com/google/play/billing/...
user avatar
6votes
3answers
8kviews

Why is the Google Play Billing Library not shown up in the SDK Manager?

I'd like to make an android application with in app purchases, I read often that I have to download the Google Play Billing Library from SDK Manager (e.g. http://www.techotopia.com/index.php/...
user avatar
6votes
5answers
4kviews

In App Purchase seems to be called multiple times

I implemented an In-App Purchase with the Play Billing Library 1.0 according to Google's tutorial. I have only 1 item for purchase and when it gets unlocked, I show a Toast message with the length ...
user avatar
6votes
1answer
5kviews

Google Play Billing Library 3.0 Released. How to migrate from 2.2.0, any changes needed?

https://developer.android.com/google/play/billing/release-notes I have implemented in app purchases (non consumable one time purchases only) using the version 2.2.0 billing library. Now the latest ...
user avatar
6votes
1answer
495views

android ANR BillingClient.queryPurchases

I am using Google billing service, version 2.0.3. Running the BillingClient.queryPurchases method in the UI thread in the activity onstart method, users sometimes encounter Application Not Responding ...
user avatar
6votes
1answer
4kviews

How to implement Android in app purchase in kotlin?

I want to implement Google Play's billing for my android app's in-app purchase, which is written in kotlin. I am following this tutorial. Here is my code: private lateinit var billingClient: ...
user avatar
6votes
3answers
178views

Google Play Pre-Launch Report Getting Security and Trust Anomalous Permission Usage issue on play billing library

When Uploaded App in Google play getting privacy issue in pre-launch report, how to get resolve this issue.
user avatar
  • 1,724
5votes
4answers
6kviews

skuDetailsList returning null

I am trying to implement in-app purchases using the latest Google Play Billing Library (2.0.1) • I've Added product Ids to the skuList and in the Google Play Console after publishing apk in Internal ...
user avatar
  • 549
5votes
2answers
1kviews

Crash in Android BillingClient with coroutines

I'm getting notified that my Billing solution is crashing in a weird way. I'm unable to reproduce it or find a fix/bypass the problem. Maybe you could help. Fatal Exception: java.lang....
user avatar
  • 1,022
5votes
1answer
7kviews

Why onPurchasesUpdated isn't being called after launchBillingFlow

I'm in the process of implementing in app billing for Android and have got to the point where I can retrieve a list of products from the store. And can activate the Google purchase dialog via calling ...
user avatar
  • 853
5votes
1answer
549views

Test Subscription multiple times

I have a subscription with a free trial period and a reduced price period. According to the Developers site (https://developer.android.com/google/play/billing/billing_testing#testing-renewals) there ...
user avatar
  • 477
5votes
0answers
229views

Google Play Billing Library 3.0.3 causing memory leak

According to release notes of Play Billing library 3.0.3 the memory leak has been fixed. But i am still getting this leak from Leak Canary Google Play Billing Library release notes Code where I am ...
user avatar
5votes
0answers
795views

How do I troubleshoot "Fatal error during the API action" (Response Code 6)

I have implemented the Play Billing Library, and it's overall been very successful - but it seems that a few calls to make a purchase (or get available products) fail w/ a Response Code 6 (Fatal error ...
user avatar
  • 1,674
5votes
0answers
311views

Android subscriptions - get reliable introductory price information

I have an subscription item with an introductory price for 1 cycle. I am able to fetch this price within the app via the getIntroductoryPrice() method. Once a purchase has been done I am having ...
user avatar
  • 1,037
5votes
0answers
124views

How can I tie Google Play Billing subscriptions to specific accounts?

My app has user accounts. Users can create an account, login, and consume content. I'm interested in creating a subscription model for certain content and using Google Play Billing as a medium for ...
user avatar
  • 20.2k
4votes
2answers
8kviews

How to check purchase state of subscription in all new Play Billing Library?

Hi am using new Play Billing Library for in app subscriptions. https://developer.android.com/google/play/billing/billing_library.html Everthing works perfect and am able to subscribe the product. But ...
user avatar
4votes
2answers
3kviews

Google Play Billing Library 2.0 Acknowledge Purchase Time Limit for Test Purchases

I have been testing the the new Google billing library release. The release notes state that "Purchases must be acknowledged within three days". Release notes During testing, I noticed that if I ...
user avatar
  • 1,134
4votes
1answer
2kviews

Open this app to confirm your subscription before Jun 23, 2020

Open this app to confirm your subscription before Jun 23, 2020. What is causing this?
user avatar
4votes
1answer
1kviews

Failed to resolve com.android.billingclient:billing:1.0

I have similar issue like here but in my case gradle cant't to resolve billing library v1.0 even if I add jcenter() repository into build script: buildscript { repositories { mavenLocal() ...
user avatar
4votes
2answers
3kviews

Play billing library connection and querying sku details

I need some input here on how connection is made and querying the sku details. I'm working on the tutorial and copying the in app billing logic over to my app. https://codelabs.developers.google.com/...
user avatar
  • 431
4votes
2answers
2kviews

Where to initialize BillingClient from Google Play Billing Library?

I’d like to use the Google Play Billing Library for in-app billing in my Android app. When the app launches, I’d like to initialize the BillingClient, start the connection, and retrieve some product ...
user avatar
  • 6,270
4votes
1answer
671views

With Google Play Billing, is it okay to wait with granting entitlement to an in-app purchase until after the purchase has been acknowledged?

The Google Play Billing library documentation on acknowledging purchases states that: you must acknowledge all purchases that have a SUCCESS state received through the Google Play Billing Library ...
user avatar
4votes
1answer
2kviews

Cancel Google Play subscription with Billing API?

Is there a way to cancel a subscription with the Google Play Billing API, specificaly using BillingClient, or I have to do it through the Google Play Developer API? Seems counterintuitive that you can'...
user avatar
4votes
2answers
1kviews

How to get purchase status from Google Play Billing?

I have a problem with the google play billing. I have an android app consist of in-app purchase there. I maintain the SharedPreference to purchase an app status. If google gave purchase status as ...
user avatar
  • 1,664
4votes
0answers
80views

Google billing Library - Fragment getting disappeared after subscription purchase

I am new to the implementation of Google's Billing library and using this system to make subscriptions inside my app. I have created a fragment that displays a list of subscriptions available for our ...
user avatar
  • 317
4votes
2answers
623views

What result codes can be returned from BillingClient.launchBillingFlow()?

I'm using using Google's Billing Library 4. The documentation for BillingClient.launchBillingFlow says: Initiates the billing flow for an in-app purchase or subscription. It will show the Google Play ...
user avatar
  • 227k
4votes
0answers
72views

Android Billing API V3 Subscription is not renewing automatically

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.
user avatar
4votes
0answers
168views

Google Play library 3.0 check if user used introductory price

I am using Google Play Billing library 3.0.3 with Java. I have an introductory price on my subscriptions. When the user already have used the introductory price, the getIntroductoryPrice() function ...
user avatar
  • 86
4votes
1answer
882views

android billing querySkuDetailsAsync always returns 0 skuDetails

I'm trying to enable in-app purchases, and can't figure out why my skuDetails query always returns 0 items. I have publicized the app to my internal testing and added my mail address to the license ...
user avatar

15 30 50 per page