0

我最近正在开发一个 android 项目,我需要获取 CELL Id 和 LAC(位置区号),并且我在我的设备中运行它我得到的值大于 CELL Id 的0xffff默认最大值

为什么会这样?3G和2G有区别吗?

这是我的代码

TextView msg = (TextView)findViewById(R.id.textView2);

final TelephonyManager telephony = (TelephonyManager)

getSystemService(Context.TELEPHONY_SERVICE);

    if (telephony.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) {
        final GsmCellLocation location = (GsmCellLocation) telephony.getCellLocation();
        if (location != null) {
            msg.setText("LAC: " + location.getLac() + " CID: " + location.getCid());
          }
    }
4

1 回答 1

1

是答案。

如ETSI TS 125 401中所解释的,小区标识符 (C-Id) 用于唯一标识 RNS 内的小区。Cell-Id 与控制 RNC 的标识符 (CRNC-Id) 一起构成 UTRAN 小区标识 (UC-Id),用于在 UTRAN 内唯一地标识小区。

UC-Id = RNC-Id + C-Id

C-Id由运营商定义,通过O&M设置在RNC中。C-Id 由其 C-RNC 在节点 B 中设置。

于 2019-01-07T08:53:58.620 回答