Sunday, June 10, 2012

[android-developers] Re: need to remove contact from group ..

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate