Hi All,
I am answering myself.
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 15, 2:55 pm, Kamal Hasan <[email protected]> wrote:
> Hi,
>
> Anybody knows how todeletesmsfrom inbox.
> I have tried using the following format but its giving Illegal
> argument Exception : Unknown URL
>
> getContentResolver().delete(Uri.parse("content://sms/
> inbox"),null,null);
>
> Anybody knows the format todeletesms?
>
> Thanks a lot
>
> Kamal
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---