Android 获取CellId以及IMEI 获取基站id

TelephonyManager tm  =  (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
        GsmCellLocation location = (GsmCellLocation) tm.getCellLocation();

int cellid = location .getCid();

String imei = tm.getDeviceId();

注:别忘加权限啊

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
< uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>

这样就成了,呵呵

你可能感兴趣的:(Android 获取CellId以及IMEI 获取基站id)