TelephonyManager电话网络信息的服务类
来源:互联网 发布:linux虚拟机真机桥接 编辑:程序博客网 时间:2024/05/01 11:52
TelephonyManager是一个管理手机通话状态,电话网络信息的服务类
TelephonyManager telMgr = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
2>获取SIM卡状态
telMgr.getSimState();
3>获取SIM卡卡号
telMgr.getSimSerialNumber();
4>获取SIM卡供货商号
telMgr.getSimOperator();
5>获取SIM卡供货商名称
telMgr.getSimOperatorName();
6>获取SIM卡国别
telMgr.getSimCountryIso();
7>获取手机类型
telMgr.getPhoneType();
8>获取网络类型
telMgr.getNetworkType();
9>获取网络供应商号
telMgr.getNetworkOperator();
10>获取网络供应商名称
telMgr.getNetworkOperatorName();
11>获得手机号码
telMgr.getLine1Number();
//漫游状态
telMgr.isNetworkRoaming();
//IMEI
telMgr.getDeviceSoftwareVersion();
//IMSI
telMgr.getSubscriberId();
ContentResolver cv = SampleActivity20.this.getContentResolver();
String tmpS = "";
//蓝牙是否开启
tmpS = android.provider.Settings.System.getString(cv,android.provider.Settings.System.BLUETOOTH_ON);
//WIFI是否开启
tmpS = android.provider.Settings.System.getString(cv,android.provider.Settings.System.WIFI_ON);
//飞行模式是否开启
tmpS = android.provider.Settings.System.getString(cv,android.provider.Settings.System.AIRPLANE_MODE_ON);
//数据漫游是否开启
tmpS = android.provider.Settings.System.getString(cv,android.provider.Settings.System.DATA_ROAMING);
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 getLine1Number()
Returns the phone number string for line 1, for example, the MSISDN for a GSM phone.
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()
Returns a constant indicating the radio technology (network type) currently in use on the device for data transmission.
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
- TelephonyManager电话网络信息的服务类
- TelephonyManager是一个管理手机通话状态,电话网络信息的服务类
- 利用TelephonyManager(电话管理器)类来去的手机通话状态、网络、位置、Sim卡等信息
- 安卓使用TelephonyManager(手机电话管理器服务)获取网络和sim卡信息
- Android 电话管理器TelephonyManager,获取网络,SIM卡信息
- Android之TelephonyManager类的方法详解(电话信息获取)
- Android提供的系统服务之--TelephonyManager(电话管理器)
- Android下使用TelephonyManager类获取设备电话相关信息
- Android下使用TelephonyManager类获取设备电话相关信息
- 使用TelephonyManager获取移动网络信息
- 安卓电话和网络开发全解:电话硬件检测、电话服务信息、sim信息、网络服务信息、数据连接和数据传输信息、电话状态监听
- 取得电信网络与手机的相关信息——TelephonyManager 与 System 的应用
- 取得电信网络和手机的相关信息之TelephonyManager与android.provider.settings.System
- 取得电信网络和手机的相关信息之TelephonyManager与android.provider.settings.System
- Android TelephonyManager电话管理器
- TelephonyManager(电话管理器)
- TelephonyManager(电话管理器)
- TelephonyManager监听电话状态
- 如何设置ubuntu的自动休眠时间
- Linux系统查看系统是32位还是64位方法总结
- POSIX线程库条件变量的使用——Pthreads线程库实例笔记4
- hdu 1735 字数统计
- java中的class文件结构
- TelephonyManager电话网络信息的服务类
- 仿照微信游戏n次郎
- php 位运算符
- 编写媒体基础MFT组件
- uva--10706+递推
- Windows Phone 8 本地代码实现游戏
- 一段大姨妈计算代码片段
- Java中的Class类
- Error executing aapt: Return code -1073741819 问题