Android的应用内结算V3没有返回正确的本地化价格(getSkuDetails)正确、价格、Android、getSkuDetails

2023-09-07 23:37:33 作者:腦袋裏空白記憶丶

我试图来测试Android的应用内结算V3 API与不同地方的价格getSkuDetails方法。

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

我已经使用由谷歌(TrivialDrive)提供的示例应用程序,并修改它显示由谷歌响应返回给getSkuDetails价格:

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.

在应用程序运行时,警报错误地显示为$ 1.00的天然气价格,但是当我试图购买更多的天然气,它显示了正确的价格MX 12.72 $购买的。

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.

为什么不getSkuDetails返回MX $ 12.72的正确的本地化,而不是价格$ 1.00?

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

乐意提供更多code片段,但上面的是我已经添加到谷歌提供的示例应用程序。

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

推荐答案

好像API目前只支持返回当地货币code和当地的价格,这是不是为会计目的有用的格式化字符串,如货币符号可以多种货币之间共享。

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.

下面是一个链接,跟踪问题:的http:/ /$c$c.google.com/p/marketbilling/issues/detail?id=93

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