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

前端 未结 19 782
星月不相逢
星月不相逢 2020-12-07 10:34

I am using the IabHelper utility classes, as recommended by Google\'s tutorial, and I\'m being hit hard by this error. Apparently IabHelper can not

19条回答
  •  无人及你
    2020-12-07 10:58

    A simple trick that did it for me was to create a method in IabHelper:

    public Boolean getAsyncInProgress() {
        return mAsyncInProgress;
    }
    

    and then in your code, just check:

    if (!mHelper.getAsyncInProgress())
        //launch purchase
    else
        Log.d(TAG, "Async in progress already..)
    

提交回复
热议问题