Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android In-app billing v3 is not returning the correct localized price (getSkuDetails)

I am trying to test the getSkuDetails method in Android In-app billing v3 API with different local prices.

I have used the sample application provided by Google (TrivialDrive), and modified it to display the price returned by Google in response to getSkuDetails:

        SkuDetails gasDetails = inventory.getSkuDetails(SKU_GAS);

        if (gasDetails != null){
            alert("Gas Price is " + gasDetails.getPrice());
        }

I have installed the app with an an account that has Google Wallet location set for Mexico.

When the app runs, the alert incorrectly shows a Gas Price of $1.00, but when I try to purchase more Gas, it shows the correct price of MX$12.72 for purchase.

Why isn't getSkuDetails returning the correct localized price of MX$12.72 instead of $1.00?

Happy to provide more code snippets, but the above is all I have added to the sample app provided by Google.

like image 588
frostysun Avatar asked Feb 22 '13 01:02

frostysun


1 Answers

Seems like the API currently only supports returning a formatted string of the local currency code and local price, which is not useful for accounting purposes, as the currency symbol can be shared between multiple currencies.

Here's a link for tracking the issue: http://code.google.com/p/marketbilling/issues/detail?id=93

like image 118
frostysun Avatar answered Oct 19 '22 15:10

frostysun