获取手机信号塔位置 - 机器人 [英] Get Cell Tower Locations - Android
本文介绍了获取手机信号塔位置 - 机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道是否有可能让所有的设备范围的信号发射塔信息?只要能够得到他们的位置,或者关于他们的任何其他信息,我怎么会去这样做呢?
Does anyone know if it is possible to get information about all of the cell towers in range of a device? Just be able to get the location of them or maybe any other information about them and how I would go about doing it?
推荐答案
这是你如何从当前的网络状态得到手机信号塔ID(CID)和LAC(位置区域code):
This is how you get the cell tower id (CID) and the lac (Location Area Code) from your current network state:
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;
}
}
}
获取纬度,之后LNG位置信息是有点棘手。这里有一个链接到一个帖子,是关于Symbian的,但有关手机信号塔的会谈 - >纬度,液化天然气的转换:<一href="http://discussion.forum.nokia.com/forum/showthread.php?s=&threadid=19693">http://discussion.forum.nokia.com/forum/showthread.php?s=&threadid=19693
这篇关于获取手机信号塔位置 - 机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文