Android获取SIM卡状态

来源:互联网 发布:淘宝不能货到付款 编辑:程序博客网 时间:2024/05/19 23:17


TelephonyManager tm = (TelephonyManager)this.getSystemService(TELEPHONY_SERVICE);//取得系统服务tm.getSimState();//获取SIM卡的6种状态,分别是TelephonyManager.SIM_STATE_ABSENT,TelephonyManager.SIM_STATE_UNKNOW//TelephonyManager.SIM_NETWORK_LOCKED,TelephonyManager.SIM_PIN_REQUIRED,TelephonyManager.SIM_PUK_REQUIRED//TelephonyManager.SIM_STATE_READY


0 0
原创粉丝点击