I'm making an Android app (API 2.3.3) and it will send/receive text messages. I can the originating address for received messages by using getOriginatingAddress()
method and it will give me a normal phone number in the phone +(country code)(number). (eg: +94713594206 for Sri Lankan numbers).
The question is, I need to check whether a contact with this received number already exists on the user's phone. If it does, get the corresponding name (Display Name) and the photo (if any) matching this number. If not, just show the raw number.
So can anyone please help me with the first instance- checking if a contact already exist that matches the given phone number, and if does exist, get the display name and photo of this matched contact?
Thanks.