Question

I am trying to make a series of inapp purchases one after other. This is how the code is setup. Make a call to purchase item by calling launchPurchaseFlow.

Now on public void onIabPurchaseFinished() I make the next call for purchase. The first call works fine. But the second call fails by throwing the exception

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

How to make this work?

Thanks

Was it helpful?

Solution

Are you using the IABHelper class?

If so, some people have reported success making the flagEndAsync method public and calling it before starting a new purchase.

More info: Android in-app billing: Can't start async operation because another async operation (is in progress)

OTHER TIPS

That is most likely because the first request has not yet finished; it would finish when you return from onIabPurchaseFinished(); the async request is not finished inside that function.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top