google / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
134 stars 111 forks source link

getting all albums --> getAdaptedEntry() returns null #254

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

Hi all,

i am using gdata picasa APIs to develop picasa application for android mobile .

i am using the following piece of code ,

public List getAlbums(String username) throws IOException, ServiceException {

String albumUrl = API_PREFIX + username;
UserFeed userFeed = getFeed(albumUrl, UserFeed.class);

List<GphotoEntry> entries = userFeed.getEntries();
List<AlbumEntry> albums = new ArrayList<AlbumEntry>();
for (GphotoEntry entry : entries) {
  GphotoEntry adapted = entry.getAdaptedEntry();
  if (adapted instanceof AlbumEntry) {
    albums.add((AlbumEntry) adapted);
  }
}
return albums;

}

I am able to get nor of entries equal to the nor of albums i am having in
the account.

But, entry.getAdaptedEntry() is returning null.

please suggest me what i can do.

thanks in advance, Babitha

Original issue reported on code.google.com by babit...@gmail.com on 31 Mar 2010 at 8:36

GoogleCodeExporter commented 9 years ago
Thanks for your feedback Babitha.  Since you are developing an Android mobile 
application I 
would recommend you switch to using the version 2.1 alpha client.  If you are 
seeing the same 
problem there, I will be happy to investigate the problem and at least identify 
what might be 
going wrong.

Original comment by yanivin...@gmail.com on 9 Apr 2010 at 1:39