1

Possible Duplicate:
Delete SMS in Android 1.5

I have searched the internet for some days now, but can't find any similar problems.

I am making an Android app, and I would like to delete a single SMS, not the whole conversation.

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?

            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);    
            }
Community
  • 1
  • 1
user1799774
  • 65
  • 2
  • 5

0 Answers0