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

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -