And, for reference, the recipe above is only for system groups (hence
the /system_id in the url).

If you want to display a non-system group, try this:

uri = Uri.parse("content://contacts/groups/" +
                "name/" +
                Uri.encode(mGroupName) +   // eg, "Starred in Android" - values 
from
android.provider.Contacts.Groups.NAME
                "/members");


Richard


On Mar 25, 6:07 pm, jarkman <[email protected]> wrote:
> Well, I haven't found a way to launch the system picker for a specific
> group, so I've written a picker using a ListView and an URI of the
> form:
>
> Uri uri = Uri.parse("content://contacts/groups/system_id/" +
> Contacts.Groups.GROUP_MY_CONTACTS + "/members");
>
> (with handy clue from 
> here:http://groups.google.com/group/android-developers/browse_thread/threa...
> - thanks, Mike!)
>
> I can't help thinking there should be a way to use ACTION_PICK and
> this Uri to summon up a working picker, but I haven't found a way to
> make that go.
>
> Richard
>
> On Mar 23, 3:26 pm, jarkman <[email protected]> wrote:
>
> > I'm using ACTION_PICK to show a contact picker:
> >         startActivityForResult( new Intent(Intent.ACTION_PICK, Uri.parse
> > ("content://contacts/people") ) ,RESULT_PICK_CONTACT_REQUEST);
>
> > I'd really like to be showing only contacts from the My Contacts
> > group, rather than the list which includes all the auto-generated
> > contacts. I had hoped to find an Extra to specify the group, but I
> > can't find any sign of one.
>
> > Is there any way to pick a contact from a specified group, or do I
> > need to write my own picker ?
>
> > Thanks,
>
> > Richard
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to