android-billing

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

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

风格不统一 提交于 2019-12-22 04:36:13
问题 I just started beta testing the 2.0 update to the billing library for the Play Store and a lot of my users are getting this error Google Play In-app Billing API version is less than 3 . Is this just a matter of time before they update or are some devices stuck on older versions or what? 回答1: In-app Billing API version goes with the Google Play Store and v3 is actually quite old (at least 3 years old) PBL will check user's client version and will return this error message if their devices have

Android in-app billing, how to handle app reinstalls

这一生的挚爱 提交于 2019-12-21 17:30:27
问题 I'm very confused on how in-app billing works. I've read the documentation and I must have missed something because I don't understand the final step I need to implement into my application to make this work. The in-app billing works great, however, if a user uninstalls my app and installs it again at a future date, my application doesn't know how to determine if the in-app purchase has previously been made. Here's a snippet from my main class where I attempt to handle all of this: @Override

Adding in-app purchase to existing published application and testing it without publishing

耗尽温柔 提交于 2019-12-21 04:14:27
问题 I'm trying to add in-app purchase for my existing published app that didn't previously have billing permission. I've uploaded an updated APK with billing permission, but didn't activate it since I don't want to publish this draft. However, I can't add in-app product - it still says "the current application version does not use the BILLING permission". Any way to solve/work around this problem? 回答1: Change Android version code in Androidmanifest.xml file. android:versionCode="1" suppose if

How to detect refund with google billingclient library

戏子无情 提交于 2019-12-21 04:12:14
问题 I was wondering how to detect a refund, or any type of cancelation of an in-app purchase(not a subscription and not a consumable). I'm currently making my test and when I refund a test in google like that : The purchase is still present in billingClient.queryPurchaseHistoryAsync() (even in queryPurchase() ). How can I detect such changes and how can I disable my app for refunded users? Thanks in advance. 回答1: Have to tried this function PurchasesUpdatedListener Listener interface for purchase

How to create in-app purchase to upgrade from free version to paid version android

纵然是瞬间 提交于 2019-12-21 01:28:07
问题 I have two version of my app Paid Version Free Version Now in free version I disabled some features that are available only in the paid version. So what i want is when user taps on any of those disabled features, the in-app purchase window should pop up and when the transaction completes the free version of the app should get replaced by the paid version. Can you please tell me what would be the right way to do that. 回答1: Free version to paid version scenario: To understand why you should

The item you have requested is not available for purchase

一个人想着一个人 提交于 2019-12-20 02:35:43
问题 I am trying to test subscriptions in android app. I use dungeons example. I uploaded apk which is not published, but subscription items are published. I added new test account(gmail) in dev console which is not developer account. I reseted phone to factory and added test account. I installed signed apk(same version as uploaded). When I try purchase I get "The item you have requested is not available for purchase" but I see in background item which I requested. Some thoughts what can be

Android billing - error you own this item

孤人 提交于 2019-12-18 09:32:18
问题 I have a ndroid application with in-app billing. I want a have a subscription. i see a google sample. i introduced billing in my application. i purchase one item. but i have problem. i click a button 'purchase' start intent ... .after closing this intent(text: you own this item, i click ok) if i want click this button again app is crushed. logs i own this item. 05-31 19:02:10.416: D/Finsky(3313): [1]CarrierParamsAction.createCarrierBillingParameters: Carrier billing config is null. Device is

Android billing - should I implement the ServiceConnection or the IMarketBillingService

£可爱£侵袭症+ 提交于 2019-12-18 07:18:16
问题 I am looking at the Android in-app billing tutorial here: http://developer.android.com/guide/google/play/billing/billing_integrate.html and they have an instruction to implement the iMarketBillingService. But I saw in another example that the ServiceConnection method was implemented. Which one should it be? I am having confusion because I am trying to do something like this: Bundle request = makeRequestBundle("CHECK_BILLING_SUPPORTED"); Bundle response = mService.sendBillingRequest(request);

Android billing exception

落花浮王杯 提交于 2019-12-17 23:17:36
问题 I am testing my billing and I got this exception: java.lang.IllegalStateException: Can't start async operation (launchPurchaseFlow) because another async operation(launchPurchaseFlow) is in progress. at utils.IabHelper.flagStartAsync(IabHelper.java:711) at utils.IabHelper.launchPurchaseFlow(IabHelper.java:316) at utils.IabHelper.launchPurchaseFlow(IabHelper.java:294) at com.problemio.SubscribeIntroActivity$6.onClick(SubscribeIntroActivity.java:117) at android.view.View.performClick(View.java