cursor - Android detect sms belongs to sender or receiver -
i want detect sms list, of messages mine , witch of them belongs other contacts.
for example:
me: "body": hi john
john "body: hi there...
  uri urismsuri = uri.parse("content://sms/");             cursor cur = getactivity().getcontentresolver().query(urismsuri, null, null, null, null);             while (cur.movetonext()) {                 //detect here }      
you can use telephony.textbasedsmscolumns.creator field creator. compare address (mobile number) distinguish other people. can number following:
(telephonymanager)getsystemservice(telephony_service).getline1number();      
Comments
Post a Comment