我想阅读android草稿箱中的所有短信我编写了一个可以阅读收件箱发送箱中所有短信的应用程序,但我不知道android草稿箱的uri路径我应该用收件箱替换草稿箱的uri路径以读取所有短信在草稿中,但它是什么?
sms objSms = new sms();
Uri message = Uri.parse("content://sms/sent");
ContentResolver cr = context.getContentResolver();
Cursor c = cr.query(message, null, null, null, null);
int totalSMS = c.getCount();
Log.i("READDDDDDDDD INBOX",totalSMS+"***************************" );
if (c.moveToFirst()) {
for (int i = 0; i < totalSMS; i++) {
objSms = new sms();
objSms.setPhone(c.getString(c
.getColumnIndexOrThrow("address")));
objSms.setMessage(c.getString(c.getColumnIndexOrThrow("body")));
objSms.setDate_time(c.getString(c.getColumnIndexOrThrow("date")));
ars.add(objSms);
c.moveToNext();
}
}
c.close();
return ars;