I want to display in listview all sent sms messages from my device, currently I only managed to display all received messages in listview. Do you have any solution on how to do it? below is my current code, Thanks in advance to your response.
ArrayList<String> items = new ArrayList<String>();
ArrayAdapter arrayAdapter;
public void displaymessage(){
arrayAdapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1, items);
ContentResolver cResolver = getContentResolver();
Cursor smsInboxCursor = cResolver.query(Uri.parse("content://sms/inbox"),null,null,null,"date");
int indexBody = smsInboxCursor.getColumnIndex("body");
if (indexBody < 0 || !smsInboxCursor.moveToFirst()) return;
do{
String str = smsInboxCursor.getString(indexBody) ;
arrayAdapter.add(str);
}while (smsInboxCursor.moveToNext());
}