を使用して Google Play からダウンロードできるアプリがありますIn-app purchase
。
サンプルの製品 ID
android.test.purchased
を使用して Google Play から製品を購入しています。製品を購入してトースト メッセージThank you. Your item will appear shortly
を受け取ることはできますが、logcat メッセージと購入したアイテムが表示されません。これは私が使用しているコードですpublic Handler mTransactionHandler = new Handler() { public void handleMessage(android.os.Message msg) { Log.i(TAG, "Transaction complete"); Log.i(TAG, "Transaction status: " + BillingHelper.latestPurchase.purchaseState); Log.i(TAG, "Item purchased is: " + BillingHelper.latestPurchase.productId); if (BillingHelper.latestPurchase.isPurchased()) { Log.i(TAG, " is purchased completed "); showItem(); } };
};
自分の製品 ID を使用して購入する場合、元のクレジット カード情報を提供する必要がありますか? 製品を購入するために、デバイスのプライマリ アカウントとしてテスト アカウントを使用しています。