InAppBilling - getPurchases错误:BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE

时间:2014-02-03 15:26:10

标签: android in-app-purchase in-app-billing

我的申请中有错误。实际上,ownedItems.getInt(“RESPONSE_CODE”)返回3(BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE)。我不明白为什么。你能帮助我吗 ?感谢

Bundle ownedItems = null;
    try {
        ownedItems = mService.getPurchases(3, mContext.getPackageName(), "ITEM_TYPE_INAPP", null);
    } catch (RemoteException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    int response = ownedItems.getInt("RESPONSE_CODE");
    Log.d("RESPONSE ", response+"");
    if (response == 0) {
        ArrayList<String> ownedSkus = 
      ownedItems.getStringArrayList("INAPP_PURCHASE_ITEM_LIST");
        return ownedSkus;
    }
    else {
        return null;
    }

编辑:本主题中提出的解决方案无法解决我的问题

1 个答案:

答案 0 :(得分:1)

替换

Inapp skuDetails = mService.getSkuDetails(3,getPackageName(), "Inapp", querySkus);

inapp skuDetails = mService.getSkuDetails(3,getPackageName(), "inapp", querySkus);