且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

确定Play商店的国家/地区

更新时间:2023-12-04 15:46:23

我不确定要以编程方式检查其Google帐户所在的国家/地区,但是如果您要定位特定的区域,则可以在Google Play开发者控制台中执行此操作.

地理定位

用于确定国家/地区的Google Play说明 >

即使这不是程序/代码的答案,我希望这比在应用程序中找出问题要容易得多,从而解决了您的问题.

I'm looking to see if there is any way to tell what country version of the play store a user has on their android phone.

Basically I want to turn off In-App Purchasing for certain countries (for tax collecting reasons). I have tried Locale but that can be changed by changing the Language in the phone. I figured the only thing that can determine what country they are from would be by the Google account that is connected to the play store.

Any help would be much appreciated. Thank You.

I'm not sure about programmatically checking their google account country, but if you want to target specific regions, you can do that within the Google Play Developer console.

Geographic targetting

Google Play Instructions for determining country

Even if it isn't a program/code answer, I hope this solves your problem much more easily than having to figure that out in your application.