I've been struggling with Android IAB v3 for a while now. I have it working consistently on my test devices. However, my crash reporting service shows two recurring crashes: one for null pointer exception and one for illegal state exception. I've tried updating the Google sample code w/ numerous suggestions from Stackoverflow users facing similar problems. I've gone through the "read crash reports, do research, attempt to fix crashes, submit update, see same crash reports again" cycle a few times. I think it's time for a different approach.
If you were starting with Android IAB today, what would you choose as the most up-to-date, correct resource for code samples, fixes, documentation, etc?
This doesn't have to be a single resource. Any combination of sample code, patches from SO posts, blog posts, or even "update with Android SDK Manager" will be helpful. Ideally, we can create a resource for folks new to IAB that prevents them from the headache and struggle of trying to integrate the service.
edit 1: More info on crashes
java.lang.IllegalStateException: Can't start async operation (refresh inventory) because another async operation(launchPurchaseFlow) is in progress.
at com.android.vending.billing.IabHelper.flagStartAsync(IabHelper.java:832)
at com.android.vending.billing.IabHelper.queryInventoryAsync(IabHelper.java:623)
at com.android.vending.billing.IabHelper.queryInventoryAsync(IabHelper.java:651)
...
java.lang.NullPointerException
at com.android.vending.billing.IabHelper.launchPurchaseFlow(IabHelper.java:398)
at com.android.vending.billing.IabHelper.launchPurchaseFlow(IabHelper.java:350)
...
Those are the two exceptions. They don't always happen in the same places in IabHelper. I could probably just patch them, but that doesn't seem like the right way to solve this problem. Also, it doesn't help anyone else.
It's possible that I'm using out-dated sample code form Google. However, I've searched quite a bit and couldn't find anything more recent.