Thursday, March 15, 2012

[android-developers] Contact search

Hi,

Need help in addressbook contact search.
So the requirement is, contact search has to be done based on the
Contact display name or emailid or phone number.

Is there any way, where i can use only one query to get the contacts,
contact email ids and phone numbers by comparing the search string
with Contact displayname or emailid or phone number?

-- If display name contains/matches the search string then display all
those conatcts emailds and phone numbers
---If not displayname, based on email id. Get all contacts and details
whose emailid matches/contains search string
--If not emailid, then based on phone id.Get all contacts and details
whose phone number matches/contains search string


So where clause of the query should include all these three checks.

Right now am doing it with 2 different uris i.e phone and email. Now
displaying first phone numbers list and then emailids. But as per
requirement matching contacts info should be displayed as group.

Thanks.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment