0
質問:購入購入アイテムのhttps://developer.android.com/training/in-app-billing/purchase-iab-products.htmlから、購入したアイテムを確認しています。アプリ内購入を確認する
私のコードは次のようになります。
ログでprivate void lookForPurchases() {
IabHelper.QueryInventoryFinishedListener lookForPurchasesListener = new IabHelper.QueryInventoryFinishedListener() {
public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
if (result.isFailure()) {
Log.e(TAG, "Error checking for purchases:" + result.toString());
}
else {
Log.d(TAG, "Processing purchases." + inventory.toString());
if(inventory.hasPurchase(SKU_LEXCOINS_100)){
Purchase purchase = inventory.getPurchase(SKU_LEXCOINS_100);
consumeCoinPurchase(purchase);
}
if(inventory.hasPurchase(SKU_LEXCOINS_550)){
Purchase purchase = inventory.getPurchase(SKU_LEXCOINS_550);
consumeCoinPurchase(purchase);
}
if(inventory.hasPurchase(SKU_LEXCOINS_1200)){
Purchase purchase = inventory.getPurchase(SKU_LEXCOINS_1200);
consumeCoinPurchase(purchase);
}
}
}
};
Log.i(TAG, "Looking for purchases");
if(inAppBillingHelper == null) {
Log.e(TAG, "Null preventing query inventory");
} else {
try {
inAppBillingHelper.queryInventoryAsync(lookForPurchasesListener);
} catch (IabHelper.IabAsyncInProgressException ex) {
Log.e(TAG, "Error retrieving purchases.", ex);
}
}
}
、しかし、私は何もない「の購入を探して」され得る最後のものは、次のとおりです。どの支店でも何かを手に入れなければならないように見えるので、誰かが私が間違っていることを見ていますか?
エラーがないか、何も返されないようです。