in-app-billing

How to setup In App purchase (Non Consumable)?

那年仲夏 提交于 2019-12-11 15:44:18
问题 I am Implementing In App purchase in my app, using some online tutorial. But the tutorial is for Consumable In App Purchase. But in my case, Users need to buy only once. I modified the Code, to disable the "Buy Button" after buying the In App Purchase. Now it's working fine. But the problem is if I close and open the app, "Buy button" getting enabled. This is my xml code <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"

Restore transactions of in-app purchases in another app

[亡魂溺海] 提交于 2019-12-11 14:25:04
问题 Using In-App Billing v3 and the IabHelper class provided by Google. Using its queryInventoryAsync method, it's easy to restore the user's transactions of my app. Now comes the tricky part! I need to restore transactions of another app of mine. Can that be done? Both apps have been signed with the same key. Both apps are published under the same developer account. Both apps happen to have the same sharedUserId (and I hope to keep it that way). I know the use of sharedUserId can cause problems

How to save the state of inApp purchase

时光总嘲笑我的痴心妄想 提交于 2019-12-11 12:46:31
问题 I have implemented inApp purchase in my game app where first three levels are free and then user has to pay to unlock remaining 7 levels. In app purchase is working fine. But once, the user buys the item, how should I handle it so that next time onwards he gets to see the levels as unlocked. Should I save it in sharedPreferences and check everytime. Or should I query everytime from google console to check the status for the particular id. Would highly appriciate if someone can suggest me the

In-app billingservice onServiceConnected() not called on 4.0/ICS

*爱你&永不变心* 提交于 2019-12-11 06:57:43
问题 My app has a single in-app purchase, and is modeled after the Dungeons sample that Google provides (viewable at http://code.google.com/p/marketbilling/source/browse/). The only difference is that the code to restore transactions on the first run has been separated out and placed in my app's main activity. (My modified "Dungeons" activity is where the user goes to purchase the plugin) The restoreTransactions() code in my main activity's onCreate() works great on both a 2.3 and 1.6 test device:

Google play API returns error

人走茶凉 提交于 2019-12-11 06:36:53
问题 i am getting the same issue as described in this post . we have used almost exactly the same code. i have tried both with Client ID and Email address of the google service account in below mehotd setServiceAccountId(GOOGLE_SERVICE_CLIENT_EMAIL) OR setServiceAccountId(GOOGLE_CLIENT_ID) error changes with the change in a/c id. if i use client id, error is 400 Bad Request { "error" : "invalid_grant" } and if i use service email id, error is 401 Unauthorized { "code" : 401, "errors" : [ { "domain

onPurchaseStateChange not getting called

末鹿安然 提交于 2019-12-11 04:48:10
问题 The sample code for the in-app feature has: onPurchaseStateChange(PurchaseState purchaseState, String itemId, int quantity, long purchaseTime, String developerPayload) and it brings information on the in-app purchase that was made (id, how much etc.). and here I can update my code but I am not getting any response in this callback method from Billing Service. What wrong in sample application. can anyone help ? Thanks in Advance. 回答1: I'm not sure what the problem is and why sometimes the

What is the difference between a “service account” and an “installed application”?

笑着哭i 提交于 2019-12-11 03:33:57
问题 To my understanding, the main difference is that a service account doesn't require a user to log in for authorization, while an installed application does. I am making an Android app (an "installed application"?) that offers an in-app subscription, and doesn't require the user to log in to an account (a "service account"?). All that I want to do is to check whether or not the user has purchased a subscription. To get a Client ID for the Google Play Developer API , I have to declare it as

Not receiving result of Android In-App Purchase using API v3

馋奶兔 提交于 2019-12-11 03:08:47
问题 I'm trying to work my way through the version 3 API of Android In-App Billing and have come across the following issue: If I start a purchase with launchPurchaseFlow, it displays the purchase dialog as expected and let's me complete the purchase. After the purchase is completed, the product is then reported as owned if I request the SKU details again. So the purchase process itself works as expected. What doesn't work are the notifications of the purchase itself. The

Android in-app-billing. When to unregister the ResponseHandler?

故事扮演 提交于 2019-12-11 03:07:17
问题 We implemented In-app Billing one year ago with no problems following the sample code from the documentation. Some weeks ago we noticed users complaints about not getting their items. While debugging the code we found that the following sentence was the root of the problem: /** * Called when this activity is no longer visible. */ @Override protected void onStop() { super.onStop(); ResponseHandler.unregister(mDungeonsPurchaseObserver); } On my Samsung Galaxy S device this method is being

Android in-app billing, non consumable items

我只是一个虾纸丫 提交于 2019-12-11 03:03:55
问题 I'm implementing in-app billing where the user shall be able to buy access to premium content. This is typical non-consumable items. (Let's say the premium content is extra questions or categories in an question-app) I have used this tutorial to create the first version. The problem is how I shall implement the non-consumable part.. How do I know that the user has bought the premium content? One solution I'm think of is to have a column in my question-table that is initially "0". When the