I am working on an SMS application. in my application I have to list all convrsation.SO I use the following Uri.
content://mms-sms/conversations/
His working tone. And the next piece of code.
Uri uri = Uri.parse("content://mms-sms/conversations/"); Cursor c= getContentResolver().query(uri, null, null ,null,null); startManagingCursor(c); if(c.moveToFirst()){ for(int i=0;i<c.getCount();i++){ body[i]= c.getString(c.getColumnIndexOrThrow("body")).toString(); number[i]=c.getString(c.getColumnIndexOrThrow("address")).toString(); c.moveToNext(); } } c.close(); for (int i = 0; i < body.length; i++) { System.out.println("body ="+body[i]); System.out.println("number ="+number[i]); }
A number prints each thread number, and a body prints every last message. But I want to receive every message of whole messages, and also help me in a conversation for a certain number.
source share