Hi,

I am using the latest google data api (140) and try to get all albums
for a user.

The feed is 
http://picasaweb.google.com/data/feed/api/user/[email protected]?kind=album

On a JavaSE environment it works fine, returning all album information
for that user. However on an AndroidOS the same code returns null!

After debugging the google data api I find out that getAdaptedEntry()
always returns null though AlbumEntries are available. Again it is
always null only when running on AndroidOS. By the way, retrieving an
album by id does also work on AndroidOS.

I use the methods provided in PicasawebClient (sample app). It does
not matter if I use

public List<AlbumEntry> 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;
  }

from the PicasawebClient or change the method to

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

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

    userFeed.getAlbumEntries();
    return albums;
  }

Does someone have a clue when getAdaptedEntry() returns null??

--

You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums 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-picasa-data-api?hl=en.


Reply via email to