I am currently battling with Android Iab v3.
I have previously been using the IabHelper class from Google to display available products with success. However, today it is no longer returning me anything.
The content of the querySku field passed to the getSkuDetails function of the IInAppBillingService in the IabHelper class is:
Bundle[{ITEM_ID_LIST=[com.app.android.credits.10, com.app.android.credits.25, com.app.android.credits.50]}]
What I get back in the bundle it return is:
Bundle[{DETAILS_LIST=[], RESPONSE_CODE=0}]
Since the time it has worked and now I have not altered the IabHelper code at all along with the code that displays the products. The important bit of code being:
private void getItemsForSale()
{
ArrayList<String> skuList = new ArrayList<String>();
skuList.add(getResources().getString(R.string.ten_credits_product_id));
skuList.add(getResources().getString(R.string.twenty_credits_product_id));
skuList.add(getResources().getString(R.string.fifty_credits_product_id));
mHelper.queryInventoryAsync(true, skuList, this);
}
@Override
public void onQueryInventoryFinished(IabResult result, Inventory inv)
{
if(result.isFailure())
{
Log.d("DEBUG", "Error Inventory Query: " + result);
AppMsg.makeText(BuyCreditsActivity.this, R.string.sorry_something_went_wrong, AppMsg.STYLE_ALERT).show();
}
else
{
// Code here queries the inv object returned which has a blank array
}
}
This is why I am so confused.
Does anyone have any idea as to what external factor might have caused this to start not returning any product details?
I'm getting the same empty bundle since yesterday. This question is not the same thing, but it was asked recently, and seems to be related: Android inventory.getSkuDetails() returning null
(I have experienced this one too about 2 weeks ago)
First answer states: "they say they have made changes which requires the apk to be published before adding in app purchases they recommend uploading the apk to alpha testing channel and published (not in draft mode)."
I will try this, perhaps it solves the problem.
Update: I published the app, but the developer console wrote that the modifications does not take effect immediately. After some hours the problem existed, but today it works well.