How to delete all sms from inbox programmatically in android?
<p>I am working on an application in which I want to delete all SMS from inbox.
For that I have used the following code.</p>

<pre><code>Uri uriSms = Uri.parse("content://sms/inbox");
Cursor c = getContentResolver().query(uriSms, null,null,null,null); 
int id = c.getInt(0);
int thread_id = c.getInt(1); //get the thread_id
getContentResolver().delete(Uri.parse("content://sms/conversations/" + thread_id),null,null);
</code></pre>

<p>This code does not work.
Is there any way to do the same?</p>
