[AC-2103] Android: In-App Billing Module - PURCHASE_STATE_CHANGED_EVENT Not Firing
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2013-05-28T16:47:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Kyle Berezin |
Assignee | Eric Wieber |
Created | 2013-05-12T14:07:25.000+0000 |
Updated | 2016-03-08T07:41:04.000+0000 |
Description
Using the in-app-billing module from the marketplace, I can't get the PURCHASE_STATE_CHANGED_EVENT to fire. The code I am using is the example app.js from the module. The device I tested on was an A855 droid. The purchase window comes up and after accepting, nothing happens.
Atleast one other user has the problem. http://developer.appcelerator.com/question/151587/android-in-app-billing-issue#comment-172249.
Attachments
File | Date | Size |
---|---|---|
Screenshot_2013-05-18-20-35-57.png | 2013-05-19T00:39:49.000+0000 | 117910 |
Hello Kyle, I downloaded the module and loaded the example up on device (Samsung Galaxy S3 4.1.2) and was unable to reproduce what you are experiencing. Correct me if I am wrong but are these the series of actions you are taking? 1. Load up the app 2. Press "Buy" button 3. Press "Buy" button again on subsequent pop up 4. Payment successful alert pops up at this point, there have been many alerts towards the bottom of my screen giving me Request IDs and states that I am currently in.. after the payment successful pop up, I get an alert with the message seen in screenshot I attached. If you are getting something different (or nothing at all) then it may have something to do with using an older version of Android. Can you do me a favor and try this code out on an emulator with a higher android version (3.0 or higher), if it works as expected here we can rule out any issues with your build/studio and I can report a bug that this doesn't work on earlier versions of android. Thanks for your cooperation and patience, I will be awaiting your reply, Carter
My A855 was off for a while and when I turned it back on to see if I could get you any more info on what was happening, it decided to work. I am not sure what caused the intermittence, I can assure you I am not just saving face and acting as though I made no mistake. Perhaps it just needed a good shutdown, restart.
Kyle, No worries, sometimes weird things happen, especially with older versions of android. If you run into this problem again, just return to this ticket and reply with any more information and I would be glad to revisit it. Good to hear things are working fine now though. Regards, Carter
This issue is not resolved. My app was released a week ago with in-app billing working perfectly. Several customers made purchases, then the purchases stopped. Now that I trace the app, I find that PURCHASE_STATE_CHANGED_EVENT is not firing. Happens on Android 4 and 2.2.3.
David, Would you mind providing a detailed list of steps to reproduce where you are seeing this error occur? I must be able to successfully reproduce the bug in order to bring it to engineerings attention or they will be lost on how to exactly fix it. Thanks, Carter
Also, include the devices, the build version of studio you deployed the app with as well as the SDK version. Thanks for your cooperation, Carter
Hi Carter, I'm fairly confident this is a problem within the Google Play service. The following link is to a screenshot of my Google Play account. You can see that between May 19 and May 26 revenue stopped. I can confirm during this period that I have debugged my app and found that PURCHASE_STATE_CHANGED was never received, and the app appeared to hang. On May 25 I started looking for a workaround and something triggered Google Play to again respond to purchase requests, so clearly without any change in the published app, Google Play is showing different behavior on different days. https://www.box.com/s/e0r5c4pnm4kdd37bihb9 Also, here are several links showing that this problem has been reported for two years now, without being addressed: https://groups.google.com/forum/?fromgroups#!topic/android-developers/RoAEFI8-NBs https://code.google.com/p/marketbilling/issues/detail?id=29 http://stackoverflow.com/questions/16217272/with-new-in-app-billing-com-android-vending-billing-purchase-state-changed-inte This is clearly a serious issue because, if it happens during restoreTransactions() it will appear to cause the app to hang waiting for a response and the developer loses the customer, and if it happens during requestPurchase() then Google happily completes the purchase and charges the customer without notifying the app to deliver the content. The fact that I've seen this happen with both restoreTransactions() and requestPurchase() is further indicator of a Google problem. The workaround I'm going with is to set a brief timer and send restoreTransactions() a second time if PURCHASE_STATE_CHANGED is not received, but there is really no way to prove that this works. Thanks, David
Thanks for looking into this David. It is unfortunate that this is hindering sales for quite a few developers, including yourself. I hope that google finds a resolution to this quickly. As this is not a Titanium bug I am going to resolve this for now. Thanks for your cooperation and insight with this. I will be sure to link other people who are having the same problem to your response as your workaround might be helpful to some people. Regards, Carter