4

I'm using the utility methods from Android's 'TrivialDrive v3 Billing Sample', and as a lot of people have, I've been getting an error:

java.lang.IllegalStateException: Can't start async operation (launchPurchaseFlow) because another async operation(launchPurchaseFlow) is in progress.

This was addressed in quite a few threads (such as here or here), and all places suggest try/catch or changing the 'async operation running' state to avoid that crash.

Those approaches don't make sense to me, since the first one requires me to implement retry mechanisms/errors throughout my app and the latter is messing with the flow of that lib (you might as well delete that "throws illegal state" code).

My question is: what is the reason for the "1 async operation at a time" restriction in IabHelper?

If there is a real reason, then maybe each method should throw an error that will force the developer to address it. If there is not, I think removing the 'throwing illegal state...' code should be removed.

Community
  • 1
  • 1
dors
  • 5,802
  • 8
  • 45
  • 71

0 Answers0