Hi Jay,
I think you need to set AutoPaging value of your service to True so you can
retrieve all contacts.

Cheers
BT


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jay Kapadia
Sent: Saturday, June 27, 2009 11:17 AM
To: Google Contacts API
Subject: [Contacts API] Regarding contacts returned


Hi,
I am trying to fetch gmail contacts from my account. I am getting only
the top 25 records. Following is the code.

userName = args[0];
                password = args[1];
                // Create a new Contacts service
                myService = new ContactsService("My Application");
                try {
                        myService.setUserCredentials(userName, password);
                } catch (AuthenticationException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
                // Get a list of all entries
                URL metafeedUrl = null;
                try {
                        metafeedUrl = new
URL("http://www.google.com/m8/feeds/contacts/";
                                        + userName + "@gmail.com/full");
                } catch (MalformedURLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }

                ContactFeed resultFeed = null;
                try {
                        resultFeed = myService.getFeed(metafeedUrl,
ContactFeed.class);
                        entries = resultFeed.getEntries();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (ServiceException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }


Jay Kapadia

Checked by AVG - www.avg.com 
Version: 8.5.374 / Virus Database: 270.12.93/2204 - Release Date: 06/26/09
18:00:00


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Contacts API" 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/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to