Hi All,


we can delete sms using the following code.

ContentResolver cr = getContentResolver();

Uri url =  Uri.parse("content://sms/");

// get the "_id" of the message which you want to delete.

int numRecs = cr.delete(url,"_id="+id, null);

//numRecs will give you number of records deleted.

Kamal

On Jan 23, 3:46 pm, [email protected] wrote:
> Hi,
>
> I am trying todeletesmsfrom inbox
>
>    getContentResolver().delete(Uri.parse("content://sms/conversations/
> 9"), null, null);
>
> the above statement does not work. gives error.
>
> Please help me
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to