for learning and to increase your information, this is code to delete
contact from group :
public static int removeFromGroup(Context ctx, String contactId, String
groupId) {
ContentValues values = new ContentValues();
values.put(ContactsContract.CommonDataKinds.GroupMembership.RAW_CONTACT_ID,
contactId);
values.put(ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID,
"");
return ctx.getContentResolver().update(
ContactsContract.Data.CONTENT_URI,values,ContactsContract.CommonDataKinds.GroupMembership.RAW_CONTACT_ID
+ "=" + contactId
+ " AND " +
ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID
+ "=" + groupId, null);
}
On Saturday, 2 June 2012 15:19:44 UTC+3, ala hammad wrote:
>
> Hi Guys ,
> i need to remove an contact or more from specific group via coding .. any
> one can help me ??
>
>
>
> thanks for your help ..
>
--
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