wuyxhero / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

NullPointer on IabHelper.java#386 (launchPurchaseFlow) #163

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
STEPS TO REPRODUCE:
Don't know

EXPECTED OUTPUT:

User complete the purchase or app not crash

ACTUAL OUTPUT:

App crash

OS VERSION: 4.1.2

DEVICE: Androidmax U

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

NOTES:

The line of code it's this: 
https://code.google.com/p/marketbilling/source/browse/v3/src/com/example/android
/trivialdrivesample/util/IabHelper.java#386

I think that you just need to add to the try/catch a NullPointer catch and send 
back to the developer a IABHELPER_SEND_INTENT_FAILED result.

Original issue reported on code.google.com by stermi on 19 Nov 2013 at 2:33

GoogleCodeExporter commented 8 years ago
Thanks, I got this a lot. I think I'll add a dispose(), because when mService 
is lost, it will not come back the next time a user clicks purchase. So in my 
purchaseButton.onClick() I check if the Helper ist setup, if not, I set it up 
with the launchPurchaseFlow(..) in the listener.

Original comment by sleepybu...@gmail.com on 4 Feb 2014 at 4:38