相邻小区的 UMTS 小区 ID
问题是,当我使用下面的源代码时,我仅在 2G 模式下收到小区 ID,如果我切换到 3G 模式,我有时会收到 HSDPA 的 -1 或 UMTS 的任何信息。源代码是:
for (int i = 0; i < neighCell.size(); i++) {
try {
NeighboringCellInfo thisCell = neighCell.get(i);
int thisNeighCID = thisCell.getCid();
int thisNeighRSSI = -113 + 2*thisCell.getRssi();
log("Base station "+(i+1)+":"+
"\nCellID: "+thisNeighCID+
"; RSSI: "+thisNeighRSSI+" dBm");
} catch (NumberFormatException e) {
e.printStackTrace();
NeighboringCellInfo thisCell = neighCell.get(i);
log(thisCell.toString());
}
}
有没有办法在 3G 模式下获取 id,尤其是 UMTS?
The problem is that when I use source code below, i receive cell id's only in 2G mode, if i switch to 3G mode i sometimes receive -1 for HSDPA or nothing for UMTS. Source code is:
for (int i = 0; i < neighCell.size(); i++) {
try {
NeighboringCellInfo thisCell = neighCell.get(i);
int thisNeighCID = thisCell.getCid();
int thisNeighRSSI = -113 + 2*thisCell.getRssi();
log("Base station "+(i+1)+":"+
"\nCellID: "+thisNeighCID+
"; RSSI: "+thisNeighRSSI+" dBm");
} catch (NumberFormatException e) {
e.printStackTrace();
NeighboringCellInfo thisCell = neighCell.get(i);
log(thisCell.toString());
}
}
Is there any way to get id's in 3G mode and especially for UMTS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您获得的 -1 值对应于 UNKNOWN_CID 常量的值,这表示单元格位置不可用。
您可以在此处的 API 中确认这一点。
它还指出与您要获取的信息相关的 get 方法仅适用于 GSM。对于 UMTS 和 CDMA,它将它们视为未知位置。
The -1 value you are getting corresponds to the value of the UNKNOWN_CID constant, which indicates the cell location is not available.
You can confirm this in the API here.
It also states that the get methods related with the information you want to acquire, only work in GSM. For UMTS and CDMA it treats them the same as unknown location.