SMS Sender's Name Shows as labuser in Default SMS App
<p>I installed the following code on my Android 2.2 phone and the sender's name shows as labuser for some messages when it is actually something else :-</p>

<pre><code>public class SMSReaderActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    ListView myListView = (ListView) findViewById(R.id.myListView);
    final ArrayList&lt;String&gt; smses = new ArrayList&lt;String&gt;();
    final ArrayAdapter&lt;String&gt; aa = new ArrayAdapter&lt;String&gt;(this,
            android.R.layout.simple_list_item_1, smses);
    myListView.setAdapter(aa);
    Context context = getApplicationContext();
    Cursor cursor = context.getContentResolver().query(
            Uri.parse("content://sms/inbox"),
            new String[] { "address", "person", "date", "body" }, null,
            null, "date desc");
    cursor.moveToFirst();
    int count = cursor.getCount();
    for (int j = 0; j &lt; count; j++) {
        String msg = cursor.getString(0) + ", " + cursor.getString(1)
                + ", " + cursor.getLong(2) + ", " + cursor.getString(3);
        Log.w("SMS", "Read SMS:" + msg);
        if (cursor.getString(3).indexOf("rbs") &gt;= 0) {
            smses.add(msg);
            Log.w("SMS", "Added");
        }
        cursor.moveToNext();
    }
    cursor.close();
    aa.notifyDataSetChanged();
}
</code></pre>

<p>labuser is not an a/c on my development machine and this happens with only matching smses. I cannot figure out the source of this.</p>

<p>Thanks
Himanshu</p>
