Hopefully soon, was a bit of a PITA. As far as I remember I overcame this by getting the product list and storing the prices from there along with the product identifier.
Ya, I want to avoid that, since we would need to change the code whenever we changed the price of an iap on Google.
@dchan You have any idea how soon we could get this on the plugin, if it is on the list of features to add ?
We have no eta on when it will be added. If it gets enough votes on feedback.coronalabs.com we’ll move it up the list though.
Sorry I was not clear.
If you use store.loadProducts you get the list of products you have added on Google along with localized price.
Oh ya, sorry i misunderstood you.
We can get the localized through the loadProducts, and are using on some apps. Although localized price are fine if you are using them only to display them to the user, we need to download the price of items to make internal analytics and use them to measure how much each user is spending.
We currently do this in iOS, and this information would allow us to do the same in Android. It should be a small enough change, seeing as this is already provided through the IabHelper class that Corona seems to be using. If this feature could be moved up the priority list it would help us a lot.
I’m trying to understand the best way to do this for analytics.
From what I can tell the product list for Google includes this price information (Sorry in yen):
“priceAmountMicros” = “100000000”,
“originalJson” = “{price”:“¥100” …
“price_currency_code”:“JPY”
"localizedPrice = “¥100”,
While iOS has these available:
price = 100,
localizedPrice = “¥100”,
I’m not 100% sure but I think Google used to have ‘price’ (without currency code) like iOS before this change?
I’m not familiar with priceAmountMicros, can we in all cases just shave off 6 zeros and then have the same value as ‘price’ on iOS?
Just wanted to mention it here. I’ve opened a request for this information to be exposed in the iap plugin. Hopefully this will be implemented soon.
This is done and has been pushed to the plugin. View more details here: http://docs.coronalabs.com/daily/plugin/google-iap-v3/loadProducts.html
more specifically:
print( event.products[i].priceAmountMicros ) --string
print( event.products[i].priceCurrencyCode ) --string
print( event.products[i].originalJson ) --string
I’m trying to understand the best way to do this for analytics.
From what I can tell the product list for Google includes this price information (Sorry in yen):
“priceAmountMicros” = “100000000”,
“originalJson” = “{price”:“¥100” …
“price_currency_code”:“JPY”
"localizedPrice = “¥100”,
While iOS has these available:
price = 100,
localizedPrice = “¥100”,
I’m not 100% sure but I think Google used to have ‘price’ (without currency code) like iOS before this change?
I’m not familiar with priceAmountMicros, can we in all cases just shave off 6 zeros and then have the same value as ‘price’ on iOS?
I’m not familiar with priceAmountMicros, can we in all cases just shave off 6 zeros and then have the same value as ‘price’ on iOS?
From http://developer.android.com/google/play/billing/billing_reference.html
Price in micro-units, where 1,000,000 micro-units equal one unit of the currency. For example, if price is “€7.99”, price_amount_micros is “7990000”.
So just divide by 1million to get the value in local currency.
Your 100,000,000 becomes 100.
I’m not familiar with priceAmountMicros, can we in all cases just shave off 6 zeros and then have the same value as ‘price’ on iOS?
From http://developer.android.com/google/play/billing/billing_reference.html
Price in micro-units, where 1,000,000 micro-units equal one unit of the currency. For example, if price is “€7.99”, price_amount_micros is “7990000”.
So just divide by 1million to get the value in local currency.
Your 100,000,000 becomes 100.
HI I am having trouble with Inn App Purchase in the PlayStore. My game is published already but Can’t buy purchases, It say Purchase Fail.
Here what the terminal Consola showing:
07-05 19:34:10.324 12405-12442/? D/Finsky﹕ [1135] InAppBillingUtils.pickAccount: company.games.ColorballSplash: Account determined from library ownership - [1dIFE8-NYKXNUmFHyTxgEIQ_AUw]_
07-05 19:34:10.324 12405-12442/? W/Finsky﹕ [1135] InAppBillingManager.getBuyIntent: Input Error: Non empty/null argument expected for sku.
07-05 19:34:10.324 14483-14496/? E/IabHelper﹕ In-app billing error: Unable to buy item, Error response: 5:Developer Error
_07-05 19:34:13.799 12405-12415/? D/Finsky﹕ [1109] InAppBillingUtils.pickAccount: com.company.games.ColorballSplash: Account determined from library ownership - [1dIFE8-NYKXNUmFHyTxgEIQ_AUw]
07-05 19:34:13.799 12405-12415/? W/Finsky﹕ [1109] InAppBillingManager.getBuyIntent: Input Error: Non empty/null argument expected for sku.
07-05 19:34:13.799 14483-14496/? E/IabHelper﹕ In-app billing error: Unable to buy item, Error response: 5:Developer Error
07-05 19:34:13.804 14483-14483/? D/ProgressBar﹕ setProgress = 0
07-05 19:34:13.804 14483-14483/? D/ProgressBar﹕ setProgress = 0, fromUser = false
Anybody can help me , PLEASE
HI I am having trouble with Inn App Purchase in the PlayStore. My game is published already but Can’t buy purchases, It say Purchase Fail.
Here what the terminal Consola showing:
07-05 19:34:10.324 12405-12442/? D/Finsky﹕ [1135] InAppBillingUtils.pickAccount: company.games.ColorballSplash: Account determined from library ownership - [1dIFE8-NYKXNUmFHyTxgEIQ_AUw]_
07-05 19:34:10.324 12405-12442/? W/Finsky﹕ [1135] InAppBillingManager.getBuyIntent: Input Error: Non empty/null argument expected for sku.
07-05 19:34:10.324 14483-14496/? E/IabHelper﹕ In-app billing error: Unable to buy item, Error response: 5:Developer Error
_07-05 19:34:13.799 12405-12415/? D/Finsky﹕ [1109] InAppBillingUtils.pickAccount: com.company.games.ColorballSplash: Account determined from library ownership - [1dIFE8-NYKXNUmFHyTxgEIQ_AUw]
07-05 19:34:13.799 12405-12415/? W/Finsky﹕ [1109] InAppBillingManager.getBuyIntent: Input Error: Non empty/null argument expected for sku.
07-05 19:34:13.799 14483-14496/? E/IabHelper﹕ In-app billing error: Unable to buy item, Error response: 5:Developer Error
07-05 19:34:13.804 14483-14483/? D/ProgressBar﹕ setProgress = 0
07-05 19:34:13.804 14483-14483/? D/ProgressBar﹕ setProgress = 0, fromUser = false
Anybody can help me , PLEASE