in-app-billing

getPurchases() NullPointerException initializing mService

安稳与你 提交于 2019-12-12 15:43:35
问题 Edit: Please see my answer below for my solution. I'm receiving a NullPointerException error when trying to check owned items using getPurchases() and I'm not sure why as I've followed the documentation. I'm finding that the documentation can be misleading at times, so here I am. I've set up In-app billing such that it initializes okay and I get a success message. After it is initialized, I want to check if the user has previously purchased item(s) and display a button based on the result.

responseCode 4 of Google In-App Billing Library 1.0

删除回忆录丶 提交于 2019-12-12 15:15:49
问题 I'm programming in-app billing function in my app for ads free version by using google in-app billing library 1.0. And I've gone through all stages of here codelab until now. However, I alway meet this error and returned responseCode is 4 (= ITEM_UNAVAILABLE ) at onPurchasesUpdated() . I had already registered my product item at google play console and activated it about 3 hours ago. Isn't it enough time? Or... are there any steps that I missed? Please let me know what is wrong? Thanks. :)

InApp Billing Verifying Order on Web Server PHP

…衆ロ難τιáo~ 提交于 2019-12-12 14:24:51
问题 I'm using a simple PHP script to verify Android order to parse download for the customer. $receipt = $_GET['purchaseData']; $billInfo = json_decode($receipt,true); $signature = $_GET['dataSignature']; $public_key_base64 = "xxxxxxxxxxxxxxxx"; $key = "-----BEGIN PUBLIC KEY-----\n". chunk_split($public_key_base64, 64,"\n"). '-----END PUBLIC KEY-----'; $key = openssl_get_publickey($key); $signature = base64_decode($signature); //$result = openssl_verify($billInfo, $signature, $key); $result =

Android In-App Purchase

◇◆丶佛笑我妖孽 提交于 2019-12-12 10:56:45
问题 Presently I am developing one application in android.I want to implement in app purchase in my app when i click a button. Please help me with simple example to implementing in app purchase for our app. Thanks in advance. 回答1: I am sorry to answer in this manner, but the documentation from Google is pretty good on the subject; http://developer.android.com/guide/market/billing/index.html The "Dungeons" example provides sample code that is pretty good. In app billing is a bit complex, and uses

How to change toast message that comes after successful purchase of a product in in-app billing

[亡魂溺海] 提交于 2019-12-12 10:33:18
问题 I am getting a message like "Thank You,Your item will be appear shortly" after user purchase the product.Now this message comes from the market place side.But i want a custom message instead of this one. How to do the same or at least how can I remove this toast notification? 回答1: As other users have said, you cannot change the toast from the Play Store. You will have to edit the Play Store App for that. What you CAN do is to check if the purchase succeeded and show your own toast saying "The

In-App Billing switching activities

佐手、 提交于 2019-12-12 10:14:01
问题 Ahh the in-app billing problems never end! ^.^ I have everything working properly to show the transaction page for the in-app purchase. If I complete the purchase it returns me to my application and after about 10 seconds it verifies the purchase and I receive the item. On the other hand, if I press the back button after returning to the application and switch to another activity it never processes the transaction. Even if I return to the in-app billing activity I never receive my purchased

Bazaar(Iranian Android Market) inAppBilling error in Android 5 Lollipop

自作多情 提交于 2019-12-12 09:56:18
问题 For inAppBilling in my app use Bazaar(Iranian Android Market) API. All things are right but in in Android 5 Lollipop this not work correctly and return error : After many search found this similar problem and this link too this one.( solutions are similar together ) So I try to adding this line : serviceIntent.setPackage("ir.cafebazaar.pardakht"); After this line: Intent serviceIntent = new Intent("ir.cafebazaar.pardakht.InAppBillingService.BIND"); Now app return this Errors : java.lang

Android in-app billing refund

北慕城南 提交于 2019-12-12 08:45:45
问题 This is the first time I am implementing in-app billing in android app and I took most of the code straightly from guideline and everything forget perfectly til I thought about refunding. The example app has already refunding implemented, but in a weird way! Refund is received on app as purchase but with state of refund which is totally understandable but the original source looks like this: // Count the number of times the product was purchased while (cursor.moveToNext()) { int stateIndex =

in-app billing for unsupported countries

时光毁灭记忆、已成空白 提交于 2019-12-12 08:20:09
问题 I want to use Google Play's in-app billing for one of my applications. But it seems I can't use it. First problem is that according to supported locations for merchants my country - Turkey - is not in the list. And as a second problem , my app is listed on some other markets except Google Play. Google Play in-app billing overview section In-app Billing Requirements and Limitations says that In-app billing can be implemented only in applications that you publish through Google Play. Therefore

In-app billing workflow in a ListView

吃可爱长大的小学妹 提交于 2019-12-12 07:18:24
问题 I implemented in-app billing in Android application, have like 6 product they are like coins the user will buy in order to buy items in my app. The setup and the testing for in-app works perfectly I read all google documents and did what they said but my problem is that my product are shown in a listView i called the function mHelper.launchPurchaseFlow according to the position in the list in the activity but the items are always consumed or owned here is my code: IabHelper