我送SMS从code&也更新SystemsSMSSent消息; 和 :if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1){ int subscriptionId = SmsManager.getDefaultSmsSubscriptionId(); SmsManager MySmsManager = SmsManager.getSmsManagerForSubscriptionId(subscriptionId); ArrayList<String> msgArray = MySmsManager.divideMessage(DefaultMsgTemplate); MySmsManager.sendMultipartTextMessage(SendSMSTo, null,msgArray, null, null); CurrentSmsParts = msgArray.size(); Log.d("SMS DETAILS : ", "\nFOUND LOLLIPOP MR1 OR ABOVE..."); Log.d("SMS DETAILS : ", "\nDETECTED DEFAULT SMS SIM..."+subscriptionId); Log.d("SMS DETAILS : ", "\nSENT MSG USING SIM..."+subscriptionId);}if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1){ SmsManager MySmsManager = SmsManager.getDefault(); ArrayList<String> msgArray = MySmsManager.divideMessage(DefaultMsgTemplate); MySmsManager.sendMultipartTextMessage(SendSMSTo, null,msgArray, null, null); CurrentSmsParts = msgArray.size(); Log.d("SMS DETAILS : ", "\nFOUND BELOW LOLLIPOP MR1..."); Log.d("SMS DETAILS : ", "\nDETECTED DEFAULT SMS SIM WHICHEVER AVAILABLE..."); Log.d("SMS DETAILS : ", "\nSENT MSG USING SIM1 OR SIM2 WHICHEVER IS AVAILABLE...");}ContentValues values = new ContentValues();values.put("address", SendSMSTo);values.put("body", DefaultMsgTemplate);getContentResolver().insert(Uri.parse("content://sms/sent"), values);SMSDone++;这里SMSDone是我的counter计数today sent SMSs通过我的应用程序...;But Users are also able to send SMSs, without my application..!!所以..,我如何查询 SMS uri 以获取今天发送的两张 SIM 卡/号码的 SMS 号码?我正在发送短信中插入我的短信;但是如何从我的应用程序中插入已发送的 SIM 号码?
添加回答
举报
0/150
提交
取消