Android获取SIM卡信息--TelephonyManager

1>获得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);

上一篇:Cocos2D-x权威指南: CCNode类方法:


下一篇:Java中toArray的用法探究(java数组与list转换)