我用过:
TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
GsmCellLocation cl = (GsmCellLocation) telephonyManager.getCellLocation();
int cid = cl.getCid();
这给出了长单元 ID。
我正在使用OpenCellID API 使用手机 ID、LAC(位置区域代码)、MNC(移动网络代码)和 MCC(移动国家代码)来查找手机的纬度和经度。使用长小区 ID 会给出不准确的位置,而使用短小区 ID 会给出准确的位置(几乎)。为了测试这一点,我使用这个应用程序找到了我手机的手机短信 ID 。
但是如何使用 android API 找到短信 ID?