从TelephonyManager获取设备信息

直接看api文档就一目了然了:

http://developer.android.com/reference/android/telephony/TelephonyManager.html#getSubscriberId()


Public Methods
List< CellInfo> getAllCellInfo()
Returns all observed cell information from all radios on the device including the primary and neighboring cells.
int getCallState()
Returns a constant indicating the call state (cellular) on the device.
CellLocation getCellLocation()
Returns the current location of the device.
int getDataActivity()
Returns a constant indicating the type of activity on a data connection (cellular).
int getDataState()
Returns a constant indicating the current data connection state (cellular).
String getDeviceId()
Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones.
String getDeviceSoftwareVersion()
Returns the software version number for the device, for example, the IMEI/SV for GSM phones.
String getGroupIdLevel1()
Returns the Group Identifier Level1 for a GSM phone.
String getLine1Number()
Returns the phone number string for line 1, for example, the MSISDN for a GSM phone.
String getMmsUAProfUrl()
Returns the MMS user agent profile URL.
String getMmsUserAgent()
Returns the MMS user agent.
List< NeighboringCellInfo> getNeighboringCellInfo()
Returns the neighboring cell information of the device.
String getNetworkCountryIso()
Returns the ISO country code equivalent of the current registered operator's MCC (Mobile Country Code).
String getNetworkOperator()
Returns the numeric name (MCC+MNC) of current registered operator.
String getNetworkOperatorName()
Returns the alphabetic name of current registered operator.
int getNetworkType()
int getPhoneType()
Returns a constant indicating the device phone type.
String getSimCountryIso()
Returns the ISO country code equivalent for the SIM provider's country code.
String getSimOperator()
Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM.
String getSimOperatorName()
Returns the Service Provider Name (SPN).
String getSimSerialNumber()
Returns the serial number of the SIM, if applicable.
int getSimState()
Returns a constant indicating the state of the device SIM card.
String getSubscriberId()
Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
String getVoiceMailAlphaTag()
Retrieves the alphabetic identifier associated with the voice mail number.
String getVoiceMailNumber()
Returns the voice mail number.
boolean hasIccCard()
boolean isNetworkRoaming()
Returns true if the device is considered roaming on the current network, for GSM purposes.
void listen( PhoneStateListener listener, int events)
Registers a listener object to receive notification of changes in specified telephony states.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值