Android delete sms messages in sent field

Before Android KitKat, it was possible to send SMS messages without storing them in the send folder of installed messaging apps on the device using this method:

SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phonenumber, null, message, null, null);

      

But how do you do this post-KitKat? Do you need to delete messages sent by the app? And if so, how is it done correctly?

+3


source to share


1 answer


Starting with KitKat, any application with permission SEND_SMS

can send messages with standard methods SmsManager

and the system will process the messages automatically. Since the default application is the only one that has write access to the Provider, it is the only one who can delete messages, so any application other than the default will not be able to delete these automatically written messages. * If you don't want them to be written, your app must be configured as the default SMS app. The application is by default responsible for recording its own outgoing messages, and it can opt out of this.




* A possible workaround for restricting write access in Android 4.4 (KitKat) can be found in here .

0


source







All Articles