Getting name of the message sender
<p>Please tell me how can i get the name of message sender.  i tried following .All field works fine but but name always 0. Please give me solution. </p>

<pre><code>    String SORT_ORDER = "date DESC";
    int count = 0;
    String[] str= new String[] { "_id", "thread_id", "address", "person", "date", "body" };

    Cursor cursor = getContentResolver().query(
            Uri.parse("content://sms"),
            str,
            null,
            null,
            SORT_ORDER);
    Log.e("!!!!!!!!", ""+cursor.getCount());

    while (cursor.moveToNext()) {
        try {
            // count = cursor.getCount();

            long messageId = cursor.getLong(0);
            long threadId = cursor.getLong(1);
            String address = cursor.getString(2);
            long contactId = cursor.getLong(3);
            String contactId_string = String.valueOf(contactId);
            long timestamp = cursor.getLong(4);

            String body = cursor.getString(5);
            Log.e("!!!!!!!!", "number"+address);
            Log.e("!!!!!!!!", "name"+contactId_string);
</code></pre>
