0

Here i am sending SMS to mutliple users, the sms are saved in sentbox which i dont want to.

 SmsManager sm = SmsManager.getDefault();
    String msg = msgText.getText().toString();
 for(int j=0;j<userNumber.length;j++){
        String sendMsg = msg.replace("studentName",userName[j]);
        sm.sendTextMessage(userNumber[j],null,sendMsg,null,null);

        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
kenji
  • 73
  • 1
  • 11
  • you can get last id of message that you send and get that message as sardar khan said then delete that message. so message should not show in the thread list of sms manager. – Vij Oct 06 '17 at 06:51

1 Answers1

0

I think you cannot do this unless you make it default app for sms check this link Delete SMS from android on 4.4.4 (Affected rows = 0(Zero), after deleted)

or you can refer to this post as well.. Delete sms from another activity Android

Sardar Khan
  • 845
  • 6
  • 16