Log.i("Send SMS", "");
String phoneNo = incomingNumber;
String newN = incomingNumber;
if (newN!=oldN)
{
SmsManager smsManager = SmsManager.getDefault();
String message = "im on a meeting call you later -ExAutoSmS-";
try {
smsManager.sendTextMessage(phoneNo, null, message, null, null);
oldN = incomingNumber;
} catch (Exception e) {
e.printStackTrace();
}
}
答案 0 :(得分:0)
@ RAJITHA首先创建shared preferences,然后在发送短信之前每次检查,如果共享偏好中不存在数字..
但请记住共享偏好商店号码,直到您没有清除或删除该应用..所以完成任务后,请清除保存的偏好。
希望你帮助.. enter link description here