安卓开发中遇到如下问题,双卡双待手机如何获取SIM2基站信息?
默认都是获取SIM1的信息,发送短信也是通过SIM1发送,请问如何获取SIM2信息,通过SIM2发送短信时如何选择SIM2卡?TelephonyManagermTelMa...
默认都是获取SIM1的信息,发送短信也是通过SIM1发送,请问如何获取SIM2信息,通过SIM2发送短信时如何选择SIM2卡?
TelephonyManager mTelManager = (TelephonyManager) this.getSystemService(this.TELEPHONY_SERVICE);
//获取手机基站信息
GsmCellLocation location = (GsmCellLocation) mTelManager.getCellLocation();
//获取手机基站Cell ID
int cid = location.getCid();
//获取手机基站LAC ID
int lac = location.getLac();
//获取运营商MCC+MNC
String operator = mTelManager.getNetworkOperator();
//获取手机IMEI号
String imei = mTelManager.getDeviceId();
SmsManager sms = SmsManager.getDefault();
//发送短信
sms.sendTextMessage(“62710”, null, message, null, null); 展开
TelephonyManager mTelManager = (TelephonyManager) this.getSystemService(this.TELEPHONY_SERVICE);
//获取手机基站信息
GsmCellLocation location = (GsmCellLocation) mTelManager.getCellLocation();
//获取手机基站Cell ID
int cid = location.getCid();
//获取手机基站LAC ID
int lac = location.getLac();
//获取运营商MCC+MNC
String operator = mTelManager.getNetworkOperator();
//获取手机IMEI号
String imei = mTelManager.getDeviceId();
SmsManager sms = SmsManager.getDefault();
//发送短信
sms.sendTextMessage(“62710”, null, message, null, null); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询