如何以编程方式检测在哪个国家的Andr​​oid设备位于当前不使用GPS? [英] How to programmatically detect in which country the android device is located currently without using GPS?

查看:191
本文介绍了如何以编程方式检测在哪个国家的Andr​​oid设备位于当前不使用GPS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序运行,我想检测当前位置的国名,并做一些东西对于具体国家的名字,我可以很容易做到使用地理codeR,GPS吧。但我想从语言环境得到它,或者更多的东西可用。

When my app runs, I want to detect the current location's country name and do some stuff for that specific country name, I can easily do it using geocoder, gps. But I want to get it from Locale or if anything more is available.

推荐答案

我不知道Android的API allowes您检查相关的GSM网络的提供商code。如果这是可能的,你可以使用这个$ C C即针对此列表中的检查$:<一href="http://www.techgsm.com/page/gsm-provider-$c$cs/network-provider-identify-$c$cs.html">http://www.techgsm.com/page/gsm-provider-$c$cs/network-provider-identify-$c$cs.html找出在哪个国家的手机是。

I dont know if Android API allowes you to check the Provider Code of the associated GSM Network. If this is possible you could use this Code an check i.e. against this List : http://www.techgsm.com/page/gsm-provider-codes/network-provider-identify-codes.html to find out in which country the Cellphone is.

这篇关于如何以编程方式检测在哪个国家的Andr​​oid设备位于当前不使用GPS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆