0

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

Zach
  • 9,989
  • 19
  • 70
  • 107
  • 1
    Well clearly it is already running and not finished yet. You need to show your full code where this is called to get any real help – Nick Cardoso Feb 10 '14 at 13:53

2 Answers2

0

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.

Amit
  • 1,836
  • 15
  • 24
  • 1
    Most likely? the error already tells him precisely this, this unfortunately doesn't answer the question of how to fix it – Nick Cardoso Feb 10 '14 at 13:55
0

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)

Community
  • 1
  • 1
Nick
  • 748
  • 1
  • 5
  • 23