Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在android中获取IMEI、LAC/CELLID_Java_Iphone_Android_Xcode - Fatal编程技术网

Java 如何在android中获取IMEI、LAC/CELLID

Java 如何在android中获取IMEI、LAC/CELLID,java,iphone,android,xcode,Java,Iphone,Android,Xcode,如何获取LAC/CELLID的IMEI数据?容易吗?在android/iphone中? 你能给我写几行吗?利用,比如下面几行: 此外,您还应使用以下权限: 希望能有所帮助。对于IMEI 是吗 与 和适用于Android。搜索是你的朋友。 TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); GsmCellLocation location = (GsmCellLoc

如何获取LAC/CELLID的IMEI数据?容易吗?在android/iphone中? 你能给我写几行吗?

利用,比如下面几行:

此外,您还应使用以下权限:


希望能有所帮助。

对于IMEI 是吗


和适用于Android。搜索是你的朋友。
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
GsmCellLocation location = (GsmCellLocation) tm.getCellLocation();
String IMEI = tm.getDeviceId();
int lac = location.getLac();
... ...
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
    TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
    String IMEI = tm.getDeviceId();
<uses-permission android:name="android.permission.READ_PHONE_STATE" />