play-billing-library

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

走远了吗. 提交于 2021-01-24 07:52:22
问题 Open this app to confirm your subscription before Jun 23, 2020. What is causing this? 回答1: PurchaseResult was returning my purchases with acknowledge as false. Using the following code, managed to fix the issue. for (Purchase purchase: purchasesResult.getPurchasesList()) { AcknowledgePurchaseParams acknowledgePurchaseParams = AcknowledgePurchaseParams.newBuilder() .setPurchaseToken(purchase.getPurchaseToken()) .build(); acknowledgePurchaseParams.getDeveloperPayload();

Android Billing Client library : How to specify Developer Payload(extra data)

白昼怎懂夜的黑 提交于 2020-07-21 07:17:12
问题 I am trying to use the new Android Billing Client library(1.0) Previously, while trying to perform a purchase, there was option to add extra data to the intent. However, when using the new library, things have been simplified to a great degree. But is there way to add the developer payload(extra string) to the purchase flow ? 回答1: The new version of the billing library supports the developer payload . You can set the developer payload when acknowledging the purchase or consuming it. val

Android Billing Client library : How to specify Developer Payload(extra data)

孤者浪人 提交于 2020-07-21 07:16:07
问题 I am trying to use the new Android Billing Client library(1.0) Previously, while trying to perform a purchase, there was option to add extra data to the intent. However, when using the new library, things have been simplified to a great degree. But is there way to add the developer payload(extra string) to the purchase flow ? 回答1: The new version of the billing library supports the developer payload . You can set the developer payload when acknowledging the purchase or consuming it. val

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

假装没事ソ 提交于 2020-06-27 16:23:26
问题 The bounty expires in 5 days . Answers to this question are eligible for a +50 reputation bounty. Namikaze Minato wants to draw more attention to this question: Hello. I am setting this bounty as I think not enough attention has been paid or the info is limited for play billing library. I can't simply get the info whether the user is subscribed or not. So I would appreciate anyone's help. thanks. I want to find out whether the user active subscription to Basic/Premium content or not from the

BillingClient always returns SERVICE_DISCONNECTED

笑着哭i 提交于 2019-12-22 04:53:12
问题 So I have a billing client which I instantiate with billingClient = BillingClient.newBuilder(this).setListener(this).build(); I then call billingClient.startConnection(new BillingClientStateListener() { @Override public void onBillingSetupFinished(int responseCode) { //TODO: use this for stuff com.android.billingclient.api.Purchase.PurchasesResult result; result = billingClient.queryPurchases(BillingClient.SkuType.SUBS); Timber.d(result.toString()); } @Override public void

I can't find Google Play Billing Library in the Android Studio SDK Manager [duplicate]

元气小坏坏 提交于 2019-12-13 16:07:00
问题 This question already has answers here : Why is the Google Play Billing Library not shown up in the SDK Manager? (3 answers) Closed 9 months ago . I'd like to make an android application with in app purchases. So I read some document and knew that I have to download the Google Play Billing Library from SDK Manager. But I can't find that library in my Android Studio SDK Manager. I tried to add compile 'com.android.billingclient:billing:1.0' to the dependencies section of the build.gradle file

How to check the expiration for subscription items

强颜欢笑 提交于 2019-12-10 13:32:58
问题 QueryInventoryFinishedListener of IabHelper has not returned the expired subscription items. On the other hand, PurchaseHistoryResponseListener of Google Play Billing Library seems to receive all purchased items, which is including expired items. On Google Play Billing Library, we have to check the purchased date of PurchaseHistoryResponseListener and each expiration date of items? 回答1: queryPurchases vs queryPurchaseHistoryAsync Generally, we should use queryPurchases(String skuType) , which

BillingFlowParams.Builder setSkuDetails for testing static Google Play Billing responses

夙愿已清 提交于 2019-12-10 12:31:18
问题 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, setSku and setType seem to be deprecated in the BillingFlowParams.Builder class. Instead, we should be using setSkuDetails(SkuDetails) . How should I change the BillingFlowParams in the example code to use SkuDetails for the test product IDs? BillingFlowParams flowParams = BillingFlowParams

BillingClient always returns SERVICE_DISCONNECTED

邮差的信 提交于 2019-12-05 08:38:23
So I have a billing client which I instantiate with billingClient = BillingClient.newBuilder(this).setListener(this).build(); I then call billingClient.startConnection(new BillingClientStateListener() { @Override public void onBillingSetupFinished(int responseCode) { //TODO: use this for stuff com.android.billingclient.api.Purchase.PurchasesResult result; result = billingClient.queryPurchases(BillingClient.SkuType.SUBS); Timber.d(result.toString()); } @Override public void onBillingServiceDisconnected() { //TODO: use this for stuff Timber.d("something went wrong "); } }); for whatever reason