user3476873
user3476873

Reputation: 31

In-app Billing v3: SKUs not found

I have set up in-app billing on my android application, to set up several subscriptions. I am using in-app billing version 3, with the utility classes offered through the com.example.android.trivialdrivesample.util project available through /extras/google/play_billing/samples/TrivialDrive.

The app is set up with the following permission:

com.android.vending.CHECK_LICENSE
com.android.vending.BILLING
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.INTERNET

I have created the products for the application and activated them in the google play developer console. They have now been active for well over a week.

The application is published in production version, and latest apk is uploaded to the developer console. This has also been this way for the same length of time.

Using the IABHelper class, I was not receiving any exceptions, but When I look up the sku details, it can not find it.

I found that when I turn on the Debug logs for IABHelper class, I get the following logs:

Starting in-app billing setup.
Billing service connected.
Checking for in-app billing 3 support.
In-app billing version 3 supported for com.testbank.app.act_full
Subscriptions AVAILABLE.
In-app Billing is set up OK
Setup successful. (response: 0:OK)
Starting async operation: refresh inventory
Querying owned items, item type: inapp
Package name: com.testbank.app.act_full
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.

This appears to indicate that inapp billing is set up correctly but is finding any products for the application.

In addition, I added my own logs to output the total number of skudetails that were being retrieved, and found that it was none.

I have confirmed that the package name, public key and skus all match their respective values in the google play developer console.

I have submitted this issue to Google Play Developer Support but in the meantime, I was hoping that there may be some additional things I could do on my end to address the issue.

Upvotes: 1

Views: 2852

Answers (1)

Swaminathan V
Swaminathan V

Reputation: 4781

You need to send the list of SKU's while you querying the Inventory as below.

ArrayList<String> skuList = new ArrayList<String> ();
skuList.add("premiumUpgrade");
skuList.add("gas");
Bundle querySkus = new Bundle();
querySkus.putStringArrayList(“ITEM_ID_LIST”, skuList); 

after adding the list hit google play store for retrieving details about products.

Bundle skuDetails = mService.getSkuDetails(3, 
getPackageName(), "inapp", querySkus);
  1. And ensure whether you have added the public key correctly .
  2. Whether you are using the signed APK.
  3. APK version that you are testing should be saame as the one that was uploaded to the store.
  4. Once it uploaded it takes 3-5 hours for updating in the google server. May be you can try after some hours of upload.

you can follow step by step procedure in Android Docs for implementing version 3 billing.

Upvotes: 2

Related Questions