Hi,

I am using the latest google data api (1.40) 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;
  }

I set the use-permission for INTERNET access.

Any idea?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to