无需GPS/WiFi/互联网即可获取用户的大概位置
我正在尝试找到一种方法来检查用户是否在美国,并以某种方式做到即时。这意味着没有 GPS,也没有互联网。 我有一些想法,但它们并不像我想要的那么准确,所以也许这里有人有一些技巧。
谢谢!
I'm trying to find a way of checking if the user is in the US, and do it somehow that it's instant. This means no GPS, and no internet.
I have a few ideas, but they're not as accurate as I'd want, so maybe someone here has some tricks up his/her sleeves.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚查看了 http://developer.android.com/ Guide/topics/resources/providing-resources.html,表 2 中有一些“MCC 和 MNC”以及“语言和区域”的资源限定符。
定义一些资源怎么样,比如说一个指示国家/地区代码的字符串,然后为您感兴趣的每个国家/地区设置一个不同的资源。
然后您可以查看该字符串以了解您所在的国家/地区。我想您需要一个进行一些实验来看看什么最有效,但它可能会有效:-)
I've just been looking at http://developer.android.com/guide/topics/resources/providing-resources.html and on table 2 there's some resource qualifiers for 'MCC and MNC' and 'Language and region'.
What about defining some resource, say a string indicating the country code, then setting up a different one for each country you are interested in.
You could then look at the string to see what country you are in. I guess you'd need a bit of experimentation to see what works best, but it might work :-)