Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android In-App billing item price

Tags:

How can the price of an in-app billing item be retrieved before actually displaying the android market frontend for the in-app purchase? Currently it looks like the user only can find out the price for an in-app item in the purchase dialog and i would like to avoid to store the prices in the application for all supported currencies.

like image 655
PsychoChris Avatar asked Apr 04 '11 01:04

PsychoChris


People also ask

Does Google take 30% of in app purchases?

Like for one-time purchases, Google's revenue share on subscriptions is 30% of the price. You receive 70% of the payment. Like for Apple, Google's cut on your revenue for subscriptions decreases to 15% after a year, so you'll retain 85% of the revenue after 12 months.

Does Android charge for in app purchases?

In your case yes google will charge. Google will charge only if you are using In-App purchase. Not in the case of any other way of payment like PayPal. For subscriptions this goes down to 15% after a year of subscriptions.

What is SKU in in app purchase?

The SKU is basically the product ID. In the Play Developer console, it will be found under Store Presence -> In App Products.


1 Answers

It is possible now with Billing API v3. You can get information with getSkuDetails() method. Example is here.

ArrayList skuList = new ArrayList(); skuList.add("premiumUpgrade");  skuList.add("gas"); Bundle querySkus = new Bundle(); querySkus.putStringArrayList(“ITEM_ID_LIST”, skuList);  Bundle skuDetails = mService.getSkuDetails(3, getPackageName(), “inapp”, querySkus);  int response = skuDetails.getInt("RESPONSE_CODE"); if (response == 0) {     ArrayList responseList = skuDetails.getStringArrayList("DETAILS_LIST");      for (String thisResponse : responseList) {         JSONObject object = new JSONObject(thisResponse);         String sku = object.getString("productId");         String price = object.getString("price");         if (sku.equals(“premiumUpgrade”)) {             mPremiumUpgradePrice = price;         } else if (sku.equals(“gas”)) {              mGasPrice = price;         }     } } 
like image 113
Sergey Glotov Avatar answered Oct 12 '22 01:10

Sergey Glotov