title: How to read the message content of a new in coming message in android?
body: <p><strong>I want to read the message body of a new incoming SMS in android, programmatically.</strong></p>
  
  <p>I tried something but that doesn't return any contents:</p>
  
  <pre><code>Uri uri = Uri.parse("content://sms/inbox");
          ContextWrapper context = null;      
          Cursor c = context.getContentResolver().query(uri, null, null ,null,null);      
          String body = null; 
          String number=null;
          if(c.moveToFirst()) {        
             body = c.getString(c.getColumnIndexOrThrow("body")).toString();
             number = c.getString(c.getColumnIndexOrThrow("address")).toString();
          }
          c.close(); 
  </code></pre>