title: Need help to delete single SMS Android app Java
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2183680/delete-sms-in-android-1-5">Delete SMS in Android 1.5</a>  </p>
  </blockquote>
  
  
  
  <p>I have searched the internet for some days now, but can't find any similar problems. </p>
  
  <p>I am making an Android app, and I would like to delete a single SMS, not the whole conversation.</p>
  
  <p>When the phone recives an SMS, I save the timestamp and when I am going to delete the message, I find the timestamp.  But I can only delete the whole thread, not the single SMS, help please?</p>
  
  <p>
  
  <pre><code>            String pid = c.getString(1);
              String uri = "content://sms/conversations/" + pid;
              //Log.i(rm,"0 "+ c.getString(5) + " " +AllSmsTime.toString());
              //Log.i(rm ,"2 " + c.getLong(1));
              if(Long.valueOf(c.getString(5)).longValue()== AllSmsTime.get(0)){
                  /*gets milliseconds*/
  
                  getContentResolver().delete(Uri.parse(uri), null, null);    
              }
  </code></pre>