문제

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

도움이 되었습니까?

해결책

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)

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top