[android-developers] Re: How to remove contact from a group]]

2009-10-29 Thread Shrenik Vikam

please look at the this, here is the answer

http://groups.google.com/group/android-developers/browse_frm/thread/282b854006f45da/471262461845f964?hl=en#471262461845f964



On Sep 15, 1:18 am, Pedro Fernandes  wrote:
> [ Attached Message ]From:Pedro Fernandes 
> To:android-develop...@googlegroups.comdate:Mon, 14 Sep 2009 
> 18:52:53 +0100Local:Mon, Sep 14 2009 10:52 pmSubject:[Fwd: 
> [android-developers] How to remove contact from a group]
>
>
> >
>
>
> [ Attached Message ]From:Henry To:Android 
> Developers Date:Mon, 14 Sep 2009 
> 01:52:58 -0700 (PDT)Local:Mon, Sep 14 2009 
> 1:52 pmSubject:[android-developers] How to remove contact from a group
>
> I have i little problem, I can create groups for contacts, can add
> persons to this group, can edit group, can also delete a group but I
> can NOT remove a contact from a group.
>
> Can anyone help me with this problem?
>
> --~--~-~--~~~---~--~~
> 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+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en
> -~--~~~~--~~--~--~---

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to remove contact from a group

2009-10-27 Thread Tom

Hi,

you can use GroupMembership attributes to remove a contact from a
group.
Here is an example :

// Form an array specifying which columns to return.
String[] projection = new String[] {
 GroupMembership.PERSON_ID,
 GroupMembership.NAME,
  };

// Get the base URI for the People table in the Contacts content
provider.
Uri contacts =  GroupMembership.CONTENT_URI;

getContentResolver().delete
(GroupMembership.CONTENT_URI,GroupMembership.NAME+" = ? ",new String[]
{groupName});
// where groupName is the group in which you want to delete
contacts


Best regards
Tom
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---