Android : issue in read sms form inbox in Samsung Galaxy device
<p>I want to read SMS from inbox. The code snippet given below works fine on the HTC Desire but does not work on the Samsung Galaxy.</p>

<pre><code>Uri uri = Uri.parse("content://sms/inbox");
Cursor c= getContentResolver().query(uri, null, null ,null,null);
startManagingCursor(c);        

String[] body = new String[c.getCount()];
String[] number = new String[c.getCount()];

System.out.println("c.getCount() :: " + c.getCount() + "  c.moveToFirst() :: " + c.moveToFirst());

if(c.moveToFirst()) {
        for(int i=0;i&lt;c.getCount();i++) {
            body[i]= c.getString(c.getColumnIndexOrThrow("body")).toString();
            number[i]=c.getString(c.getColumnIndexOrThrow("address")).toString();
            c.moveToNext();
        }
    }
 c.close();
</code></pre>

<p>On the samsung galaxy <code>c.getCount()</code> returns 0 and <code>c.moveToFirst()</code>returns false.</p>

<p>Thanks in advance.</p>
