Hi All

I want to fetch all goolge contact of a group by group id.Here is my code.


    public ArrayList<T> Get_Contact_Info(String groupid, String groupname) {

        ArrayList<Contact_Content> contactlist = new
ArrayList<Contact_Content>();
        String[] projection = new String[] {

                ContactsContract.CommonDataKinds.GroupMembership.CONTACT_ID,
                ContactsContract.CommonDataKinds.GroupMembership.STARRED,

ContactsContract.CommonDataKinds.GroupMembership.DISPLAY_NAME};

        Cursor contacts =
contentresolver.query(ContactsContract.Contacts.CONTENT_URI, projection,

ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID
                        + " =='" + groupid + "'", null,

ContactsContract.CommonDataKinds.GroupMembership.DISPLAY_NAME
                        + " COLLATE LOCALIZED ASC");

        while (contacts.moveToNext()) {
}

Here "groupid" is the id of a group which I am generating by another query.
When I debug, red lines red lines stops my programmer.Can anyone check the
code plz?

Thanks in advance.

Regards
Goutom

-- 
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