0

3G モードでは近隣リストを取得しましたが、2G モードでは取得できませんでした。2gモードで隣接リストを取得するのを手伝ってくれる人はいますか? 2G モードで取得できなかったスクランピング コード...どうすればこの値を取得できますか

TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
GsmCellLocation cellLocation = (GsmCellLocation) telephonyManager.getCellLocation();

int cid = cellLocation.getCid();
int lac = cellLocation.getLac();
textGsmCellLocation.setText(cellLocation.toString());
textCID.setText("gsm cell id: " + String.valueOf(cid));
textLAC.setText("gsm location area code: " + String.valueOf(lac));
4

1 に答える 1

0

試してみandroid.telephony.TelephonyManagergetNeighboringCellInfo()

ハードウェアの実装に応じて、すべてのデバイスでうまく機能するとは限らないため、注意してください。

于 2012-09-16T13:07:55.423 に答える