Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IabHelper returning "User canceled" instead of "Item already owned" (when trying to purchase owned item) #196

Open
GoogleCodeExporter opened this issue Jan 13, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

STEPS TO REPRODUCE:

1. Purchase item on phone 1 (make sure it's successful, we want to won item.
2. Try to purchase same item pack on phone 2 (before device reboot, or clearing 
Google Play cache, which the user might not know about)
3. Google dialog shows, showing "You already own this item".
4. Click ok.

In my implemented listener -> onIabPurchaseFinished(IabResult result, Purchase 
purchase) I now look at the logs.

EXPECTED OUTPUT:
If Item is already owned, I'd like to get a 
BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED back to the 
onIabPurchaseFinished(IabResult result, Purchase purchase); 

(This way I can give user correct response)

ACTUAL OUTPUT:
"Purchase finished: IabResult: User canceled. (response: -1005:User cancelled), 
purchase: null" 

I can't act on "User canceled". 

I see in your code that you get the correct info from Play (an int 7, with 
which you fetch the "user cancelled" messsage. 

AFFECTED ORDER IDS (IF RELEVANT):

OS VERSION:
4.2.1
4.4.2

MARKET/MYAPPS VERSION:
In-app version 3, using IabHelper.java you guys checked in at Aug 6, 2014.

DEVICE:
Sony Z2, Galaxy S4, Galaxy nexus

OUTPUT FROM ADB BUGREPORT ATTACHED:
(Note: The output from "adb bugreport" is required for all bug reports.)

NOTES:
 Relevant info starts in attached file is: "onActivityResult(10001,0,Intent { (has extras) }"





Original issue reported on code.google.com by [email protected] on 2 Sep 2014 at 8:36

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant