0

I'm trying to get all the contacts that have more than one phone number. Using sqlite3, I queried the database like this:

select number,name,person,type 
  from view_v1_phones 
  where person in 
  (select person from view_v1_phones group by person having count(*)>1);

and got what I was looking for. However, I don't know how I can use this when I'm querying the database using contacts api (ContactsContract).

Help!

zorglub76
  • 4,852
  • 7
  • 37
  • 46

1 Answers1

0

Here is a link I found when I was working on something similar. This one is a pretty comprehensive guide to contacts in android. It is a 6-page guide! Hope this helps:

http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/1/

Srichand Yella
  • 4,218
  • 2
  • 23
  • 24
  • It's a good tutorial, but, as most others, it shows only a basic retrieval of contacts (get all contacts and do something with each one while iterating over them). I need to work with a lot of contacts (500+) and this "get all" approach is very inefficient. I need a bit more advanced DB querying. – zorglub76 Jun 20 '11 at 04:12