Попробуйте этот код:
Uri SMSURI = Uri.parse("content://sms/inbox");
String[] projection = new String[]{"_id", "address", "body", "date"};
Cursor cursor = null;
try {
cursor = getContentResolver().query(SMSURI
, projection
, null //selection
, null //selectionArgs
, null); //sortOrder
if (cursor != null && cursor.moveToFirst()) {
do {
int id = cursor.getInt(cursor.getColumnIndex("_id"));
String address = cursor.getString(cursor.getColumnIndex("address"));
String body = cursor.getString(cursor.getColumnIndex("body"));
String date = cursor.getString(cursor.getColumnIndex("date"));
Toast.makeText(getBaseContext(), "Message is >>"+body,
Toast.LENGTH_SHORT).show();
}
} while (cursor.moveToNext());
}
} finally {
if (cursor != null) {
cursor.close();
}
}