I am building the "inapp" billing system in my application. After i execute
skuDetails = mService.getSkuDetails(3, "my_app_package_name", "inapp", bundle);
ArrayList<String> responseList = skuDetails.getStringArrayList("DETAILS_LIST");
I always get responseList.size()
equal to 0, even if i have set 2 items in "in-app products" in the developer console, and i am passing them to:
ArrayList<String> skuList = new ArrayList<String> ();
skuList.add("first_id");
skuList.add("second_id");
Bundle bundle = new Bundle();
querySkus.putStringArrayList("ITEM_ID_LIST", bundle);
The app is currently in Draft.
The operation result code is 0.
I double checked the base64 key i pass to:
mHelper = new IabHelper(this,Config.getBase64publicKey());
that i got from services and API menu.
I tried .getSkuDetails()
both in main thread or in an asynctask.
Can somebody help me out or suggest other things to check?
Draft app testing is no long supported for testing in-app purchases. Hence you are getting an empty response.
https://developer.android.com/google/play/billing/billing_testing.html#draft_apps
For me personally, I had set the SkuType incorrectly. For example, I had used params.setSkusList(skuList).setType(BillingClient.SkuType.INAPP);
instead of params.setSkusList(skuList).setType(BillingClient.SkuType.SUBS);
when my app is a subscription based app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With