Domanda

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

È stato utile?

Soluzione

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)

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top