我一直面临这样一种情况,即我观察到即使手机中没有 SIM 卡,Android 的 TelephonyManager 也会为我提供位置区号和手机 ID。
cellLocation = (GsmCellLocation) mTMInstance.getCellLocation();
if(cellLocation == null)
return false;
currentCellID = ((GsmCellLocation)cellLocation).getCid();
currentLac = ((GsmCellLocation)cellLocation).getLac();
currentImsi = mTMInstance.getSubscriberId();
有人可以确认您是否遇到过类似的问题吗?我已经在 froyo 上编译并在 Gingerbread 上运行该应用程序。