content://sms/inbox
content://sms/sent
content://sms/draft
content://sms/outbox
content://sms/failed
content://sms/queued
sms相关的字段如下:
_id
thread_id
address
person
date
protocol
read
status
type
body
service_center
subject
reply_path_present
删除短信:
getContentResolver().delete(Uri.parse("content://sms"), "_id=?",new String[]{"3"});
getContentResolver().delete(Uri.parse("content://sms/conversations/3"),"_id=?", new String[]{"5"});
修改短信:
ContentValues cv = newContentValues();
cv.put("thread_id","2");
cv.put("address","00000");
cv.put("person","11");
cv.put("date","11111111");
this.getContentResolver().update(Uri.parse("content://sms/inbox/4"),cv, null,null);
插入短信:
ContentValues cv = newContentValues();
cv.put("_id","99");
cv.put("thread_id","0");
cv.put("address","9999");
cv.put("person","888");
cv.put("date", "9999");
cv.put("protocol", "0");
cv.put("read", "1");
cv.put("status", "-1");
//cv.put("type", "0");
cv.put("body", "@@@@@@@@@");
this.getContentResolver().insert(Uri.parse("content://sms/failed"),cv);