I've been looking at a similar problem. Something like this: Cursor cursor = context.getContentResolver().query( Contacts.GroupMembership.CONTENT_URI, new String[] {Contacts.GroupMembership._ID,Contacts.GroupMembership.PERSON_ID, Contacts.GroupColumns.NAME}, Contacts.GroupMembership._ID = Contacts.Groups.GROUP_MY_CONTACTS, null, null);
will get you the IDs of the people in the group. I'd love to make a cursor which also included the name of the person, but as far as I know there is no way to do that with a single query. That is, as far as I can tell, there's no way to do a join via the content provider interface, and permissions prevent us from accessing the contacts database directly via SQL calls. I really hope somebody can prove me wrong! Richard On Nov 24, 11:14 am, Huebi <[EMAIL PROTECTED]> wrote: > I'd like to get a Cursor for all contacts in the "My Contacts" group. > I could not figure out how to do this with the ContentProvider. As far > as I understood the table structure, I need to use the GroupMembership > table, the Groups table (to get the ID of the "My Contacts" group and > the People table to actually retrieve the contact data. Has anyone > successfully solved this task? > > 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---