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

前端 未结 19 785
星月不相逢
星月不相逢 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:48

    I had the same issue and the problem was that I didn't implement the method onActivityResult.

    @Override
    protected void onActivityResult(int requestCode,
                int resultCode,
                Intent data)
    {
        try
        {
            if (billingHelper == null)
            {
                return;
            } else if (!billingHelper.handleActivityResult(requestCode, resultCode, data))
            {
                super.onActivityResult(requestCode, resultCode, data);
            }
        } catch (Exception exception)
        {
            super.onActivityResult(requestCode, resultCode, data);
        }
    }
    

提交回复
热议问题