Get contact name of the sender from the sms table?
<p>Hii i am using the following to get the sms from the inbox </p>

<pre><code>ContentResolver cr = getContentResolver();
    Cursor cur = cr.query(Uri.parse("content://sms"), null,null,null, null);        
    DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");

     cursor_count=cur.getCount();

    if(cur.moveToFirst())
    {           
        do {

            sender.add(cur.getString(2));

            msg.add(cur.getString(11));
            date.add(formatter.format(Long.parseLong(cur.getString(4))));
        } while (cur.moveToNext());
</code></pre>

<p>i get the address of the person from the address field but i also want to get the contact name of the sender if stored in my contacts ,the person field always returns null y?</p>
