Android Market In-App-Purchase: How to get the currency a user will pay in?(Android Market In-App-Purchase:如何获得用户支付的货币?)
问题描述
我有一个使用 In-App-Purchase 的 Android 应用来迎合国际受众,因此我希望以不同的货币付款.当然我想用用户的当地货币显示要购买的物品,但我真的不知道怎么做.
I have an Android app using In-App-Purchase that caters to an international audience, so I expect payments in different currencies. Of course I would like to show the items for purchase with the user's local currency, but I don't really know how.
使用用户的地区或语言似乎是一个不好的指标,因为货币似乎取决于用户正在使用的市场帐户的地区,而不是设备设置.
Using the region or language of a user seems like a bad indicator, as the currency seems to depend on the region of the Market account the user is using and not on the device settings.
我如何知道用户将使用哪种货币付款?
How can I find out which currency a user will pay in?
谢谢.
推荐答案
截至 IAB 版本 3,可购买商品的 SKU 详细信息包括格式化的价格,其中包括用户将支付的货币(与他们的 Google Play 商店对应的货币):
As of IAB Version 3, the SKU details for the purchasable item include a formatted price, which includes the currency the user would pay in (the corresponding currency to their Google Play store):
price 值的一些示例(不是来自真实 SKU):
Some examples of values of price (not from a real SKU):
- 3,99 欧元
- 2.99 英镑
- 4.99 美元
编辑:我更新了 SKU 详细信息表,现在包括有关 price_currency_code 字段的信息.
EDIT: I've updated the SKU details table, now including information about the price_currency_code field.
这篇关于Android Market In-App-Purchase:如何获得用户支付的货币?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android Market In-App-Purchase:如何获得用户支付的货币?
基础教程推荐
- NSString intValue 不能用于检索电话号码 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
