I am wondering, how can I read sms message for a specific number programmatically? I know how to read sms using content provider but not sure if I should use the \"person\"
You may use SelectionArgs to be more efficient:
String[] phoneNumber = new String[] { "+18839494492" }; //the wanted phone number
Cursor cursor1 = getContentResolver().query(Uri.parse("content://sms/inbox"), new String[] { "_id", "thread_id", "address", "person", "date","body", "type" }, "address=?", phoneNumber, null);
With this change you only get the sms from the wanted number and you have not to crawl through all received SMS.