获取手机信号塔位置-Android

有谁知道是否有可能获得有关设备范围内所有蜂窝塔的信息?只是能够获得它们的位置或有关它们的任何其他信息,以及我将如何去做?

回答:

这是从当前网络状态获取基站信号塔ID(CID)和lac(位置区号)的方法:

mPhoneStateReceiver = new PhoneStateIntentReceiver(this, new ServiceStateHandler());

mPhoneStateReceiver.notifyServiceState(MY_NOTIFICATION_ID);

mPhoneStateReceiver.notifyPhoneCallState(MY_NOTIFICATION_ID);

mPhoneStateReceiver.notifySignalStrength(MY_NOTIFICATION_ID);

mPhoneStateReceiver.registerIntent();

private class ServiceStateHandler extends Handler {

public void handleMessage(Message msg) {

switch (msg.what) {

case MY_NOTIFICATION_ID:

ServiceState state = mPhoneStateReceiver.getServiceState();

System.out.println(state.getCid());

System.out.println(state.getLac());

System.out.println(mPhoneStateReceiver.getSignalStrength());

break;

}

}

}

之后获取Lat,Lng位置信息比较麻烦。这是指向有关Symbian的帖子的链接,但涉及到Cell Tower->

Lat,Lng转换:http

://discussion.forum.nokia.com/forum/showthread.php?s=&threadid=19693

以上是 获取手机信号塔位置-Android 的全部内容, 来源链接: utcz.com/qa/417776.html

回到顶部