在AndroidManifest.xml文件中要添加 才有权限
[javascript]
TelephonyManager tm = (TelephonyManager) this.getSystemService(TELEPHONY_SERVICE);
/*
* 电话状态:
* 1.tm.CALL_STATE_IDLE=0 无活动
* 2.tm.CALL_STATE_RINGING=1 响铃
* 3.tm.CALL_STATE_OFFHOOK=2 摘机
*/
tm.getCallState();//int
/*
* 电话方位:
*
*/
tm.getCellLocation();//CellLocation
/*
* 唯一的设备ID:
* GSM手机的 IMEI 和 CDMA手机的 MEID.
* Return null if device ID is not available.
*/
tm.getDeviceId();//String
/*
* 设备的软件版本号:
* 例如:the IMEI/SV(software version) for GSM phones.
* Return null if the software version is not available.
*/
tm.getDeviceSoftwareVersion();//String
/*
* 手机号:
* GSM手机的 MSISDN.
* Retur