Search code examples
androidin-app-billing

Google Play IAB suddenly doesn't work for my phone


I developed an Android app with IAB. It works well until today I suddenly can't purchase any items any more. First of all the querying of the SKUDetails return a null object:

    m_helper.queryInventoryAsync(true,moreSkus,new IabHelper.QueryInventoryFinishedListener() {
        @Override
        public void onQueryInventoryFinished(IabResult result, Inventory inv) {

            SkuDetails details = inv.getSkuDetails(prodId);
        }
    });

The details is null.

Secondly if I just ignore this error and call:

    m_helper.launchPurchaseFlow(m_activity, productId, requestId,new IabHelper.OnIabPurchaseFinishedListener() {
        @Override
        public void onIabPurchaseFinished(IabResult result, Purchase purchase) {
        }
    }

The onIabPurchaseFinished is never called and I got "“The item you were attempting to purchase could not be found”.

I don't know what happened? The app was working and my clients can still purchase the items. Can anybody advise?


Solution

  • I had this same problem today, double checked everything but still got this error. Was driving me crazy. I emailed Google support and they replied with this:


    Thank you for contacting Google Play Developer Support and reporting the behavior you're seeing with in-app billing.

    We recently made some changes to our systems and we are now requiring an app to be published before testing. We are currently recommending to publish your APK to the Alpha channel in order to test licensing, in-app billing, and expansion files. There is no need to create a special testing group in the Alpha channel to test these features, however the app must be published and not in draft mode.

    We apologize for the inconvenience and are working to update our documentation to reflect these changes.


    I published my APK to Alpha, gave it a couple hours, and now can see my test purchases again.