TelephonyManager mTelephonyManager =(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
// 返回值MCC + MNC
String operator = mTelephonyManager.getNetworkOperator();
int mcc = Integer.parseInt(operator.substring(0, 3));
int mnc = Integer.parseInt(operator.substring(3));
// 中国移动和中国联通获取LAC、CID的方式
GsmCellLocation location = (GsmCellLocation) mTelephonyManager.getCellLocation();
int lac = location.getLac();
int cellId = location.getCid(); 我是移动的手机,得到的MCC,MNC和LAC都对,就是CellID不对。CellID的值是220234061,有时又是220205921,就在公司的办公室。
下了一个基站定位的软件,显示的CellID是4961,显示的详细地址也是对的。
我为什么会得到这么奇怪的值呢?
// 返回值MCC + MNC
String operator = mTelephonyManager.getNetworkOperator();
int mcc = Integer.parseInt(operator.substring(0, 3));
int mnc = Integer.parseInt(operator.substring(3));
// 中国移动和中国联通获取LAC、CID的方式
GsmCellLocation location = (GsmCellLocation) mTelephonyManager.getCellLocation();
int lac = location.getLac();
int cellId = location.getCid(); 我是移动的手机,得到的MCC,MNC和LAC都对,就是CellID不对。CellID的值是220234061,有时又是220205921,就在公司的办公室。
下了一个基站定位的软件,显示的CellID是4961,显示的详细地址也是对的。
我为什么会得到这么奇怪的值呢?
解决方案 »
- 由HashMap的遍历看android的优化
- 安卓开发 短信提示
- 求助调用webservice返回值问题
- 请教:打开一个apk,除了用包名,还有用什么方式?
- 移植WinCE的游戏到OPhone时,应该怎么处理GUI部分?
- apk中想要附带些视频资源(几十M),请问如何实现?
- 如何给apk安装包配置动态参数
- Camera的回调函数onPreviewFrame
- 目前安装android的SDK,在线安装的那种一直提示 google的文件找不到,没办法安装,求完整版SDK地址
- eclipse中如何修改项目名称 具体操作
- 一个关于webview加载本地html,执行js给页面传值为空
- android默认启动程序的问题
我该怎么做呢?