使用基站、wifi实现定位

其中几个要

//国家代码

 mcc = manager.getNetworkOperator().substring(0, 3);

 

//网号

mnc = manager.getNetworkOperator().substring(3, 5);

//基站号

 currentCell.cellId = gsm.getCid();

//区域码

lac = gsm.getLac();

注:别忘加权限啊

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>

使用基站、wifi实现定位
http://fengzhizi715.iteye.com/blog/825716


manager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
listener = new PhoneStateListener();
manager.listen(listener, 0);


Android PhoneStateListener 问题
http://fonter.iteye.com/blog/714306


Android之TelephonyManager&GsmCellLocation类的方法详解
http://blog.163.com/charge_king/blog/static/519245702011432426807/

LiveLocus,无需耗费GPRS流量的Android定位追踪程序
http://www.iteye.com/topic/367993

android 基站定位

http://ouyangfeng521.iteye.com/blog/1064382

基站定位代码封装

http://z466459262.iteye.com/blog/662241

你可能感兴趣的:(wifi)