public static Channel fetchGroup(Context context, Integer groupId, String groupName) { Channel channel = new Channel(groupId, groupName); String where = ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID + "=" + groupId + " AND " + ContactsContract.CommonDataKinds.GroupMembership.MIMETYPE + "='" + ContactsContract.CommonDataKinds.GroupMembership.CONTENT_ITEM_TYPE + "'"; String[] projection = new String[]{ContactsContract.CommonDataKinds.GroupMembership.CONTACT_ID, ContactsContract.Data.DISPLAY_NAME}; Cursor cursor = context.getContentResolver().query(ContactsContract.Data.CONTENT_URI, projection, where, null, ContactsContract.Data.DISPLAY_NAME + " COLLATE LOCALIZED ASC"); while (cursor.moveToNext()) { channel.getContacts().add(ContactUtils.getContact(context, cursor.getLong(cursor.getColumnIndex(ContactsContract.CommonDataKinds.GroupMembership.CONTACT_ID)))); } cursor.close(); return channel; }