直接上代码
TelephonyManager mTelephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
// 返回值MCC + MNC
String operator = mTelephonyManager.getNetworkOperator();
int mcc = Integer.parseInt(operator.substring(0, 3));
int mnc = Integer.parseInt(operator.substring(3));
// 中国移动和中国联通获取LAC、CID的方式
GsmCellLocation location = (GsmCellLocation) mTelephonyManager.getCellLocation();
int lac = location.getLac();
int cellId = location.getCid();
Log.i(TAG, " MCC = " + mcc + "\t MNC = " + mnc + "\t LAC = " + lac + "\t CID = " + cellId);
在log信息中就可以看到获取到的lac和cid的值,最后不要忘了在