简体   繁体   English

如何从Android应用程序内部了解用户谷歌播放国家?

[英]How to know users google play country from inside the android app?

We have some in-app products and subscriptions.我们有一些应用内产品和订阅。 The price varies from one country to another.价格因国家/地区而异。 The problem is that we dont know how to detect the country within the app.问题是我们不知道如何在应用程序中检测国家。 We are guessing based on a few things but what happens is that we guess the country and show him x price and when the user proceeds to google payment, google detects another country (based on playstore account?) and shows him y price.我们根据一些事情进行猜测,但发生的情况是我们猜测国家并向他显示 x 价格,当用户继续使用谷歌付款时,谷歌检测到另一个国家(基于 Playstore 帐户?)并向他显示 y 价格。 This is a violation of google policy and they want us to fix it.这违反了谷歌政策,他们希望我们修复它。 But how do we fix it?但是我们该如何解决呢? Is there an api which we can call to know the country which matches with google's understanding of the country.有没有一个api,我们可以调用它来了解与google对国家/地区的理解相匹配的国家/地区。

(It has been repeated but about 8 years ago.. so i am not sure if something has changed since) (它已经重复了,但大约在 8 年前......所以我不确定从那以后是否发生了一些变化)

Why don't you try to get Locale from the system & perform operations further according to it..为什么不尝试从系统中获取Locale并根据它进一步执行操作..

Try this thing to get the current locale of the user试试这个东西来获取用户的当前语言环境

Locale current = ConfigurationCompat.getLocales(getResources().getConfiguration()).get(0);

If you need some more information regarding it, let me know.如果您需要有关它的更多信息,请告诉我。

 -------------- EDIT ------------------

follow the link below for detailed information, it not possible to get the country linked with play store account for now.请点击以下链接了解详细信息,目前无法将国家与 Play 商店帐户关联。 But you can trick around to fix it.但是你可以欺骗来修复它。

Determine Play Store Country确定 Play 商店国家/地区

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何知道用户是否已经从Google Play更新了Android应用 - how to know user has update the Android app from google play or not 如何知道Android应用来自Google Play商店 - how to know a android app come from Google Play store 如何知道该应用是从Google Play下载的? - How to know the app is downloaded from Google Play? 将用户从一个Android应用迁移到Google Play中的另一个应用 - Migrate users from one Android app to another app in Google play Google Play如何知道应用安装的国家/地区? - How Google play knows the country of app installation? 如何让用户从应用程序内部为Android应用程序评分(无需重定向到Play商店) - How to Let Users Rate an Android App from inside the App (without redirecting to the Play Store) 如何知道应用是否已从Google Play或亚马逊下载? - How to know if an app has been downloaded from Google Play or Amazon? 如何知道谁从Google Play下载了该应用程序的电子邮件ID - how to know email id of whom downloaded the app from Google Play 如何知道是否通过Facebook促销或Google Play安装了应用程序? - How to know whether app is installed from Facebook promotion or Google play? Android / Google Play 应用内购买“您所在国家/地区不提供商品” - Android / Google Play in-app purchase "Item unavailable in your country"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM