Hi Mike,
I have the same problem: myUserFeed.getAlbumEntries() returns 0 entries
where myUserFeed.getEntries() returns the correct number of Albums but they
are GphotoEntry(not AlbumEntry).
I am using Version 2.0 libraries on Android.
I added :
gdata-base-1.0.jar
gdata-client-1.0.jar
gdata-client-meta-1.0.jar
gdata-core-1.0.jar
gdata-docs-3.0.jar
gdata-docs-meta-3.0.jar
gdata-media-1.0.jar
gdata-photos-2.0.jar
gdata-photos-meta-2.0.jar
activation.jar
mail.jar
servlet-api.jar
guava-jdk5-13.0.jar
libraries.
-------------------
So:
#1: It doesn't print anything
for (AlbumEntry entry : myUserFeed.getAlbumEntries()) {
Log.v("test", entry.getGphotoId() + ":" + entry.getTitle().getPlainText() );
Log.v("test", entry.getGphotoId() + ":" + entry.getSummary().getPlainText()
);
}
#2: It prints album info (but they are not AlbumEntry)
for (GphotoEntry entry : myUserFeed.getEntries()) {
Log.v("test", entry.getGphotoId() + ":" + entry.getTitle().getPlainText() );
Log.v("test", entry.getGphotoId() + ":" + entry.getSummary().getPlainText()
);
}
#3: It prints album info (but they are not AlbumEntry)
Query albumQuery = new Query(feedUrl);
AlbumFeed feed = service.query(albumQuery, AlbumFeed.class);
for (GphotoEntry entry : feed.getEntries()) {
Log.v("test", entry.getGphotoId() + ":" + entry.getTitle().getPlainText() );
Log.v("test", entry.getGphotoId() + ":" + entry.getSummary().getPlainText()
);
}
On Tuesday, September 18, 2012 5:45:35 PM UTC-4, Mike Erickson wrote:
>
> Okay, I put together a working test file with a new set of client
> libraries downloaded. I was able to successfully print album titles like
> this:
>
> URL feedUrl = new URL("
> https://picasaweb.google.com/data/feed/api/user/default?kind=album");
> UserFeed userFeed = myService.getFeed(feedUrl, UserFeed.class);
>
> for (AlbumEntry albumEntry : userFeed.getAlbumEntries()) {
> System.out.println(albumEntry.getTitle().getPlainText());
> }
>
> Ralph, the problem for you might be that you are calling
> UserFeed.getEntries() instead of UserFeed.getAlbumEntries() which is
> returning a base class instead of the AlbumEntry class the way you were
> expecting.
>
> Let me know if you have more trouble here.
>
> Thanks,
> -m.e.
>
> On Tuesday, September 18, 2012 10:26:54 AM UTC-7, Mike Erickson wrote:
>>
>> Hi Ralph,
>>
>> I'm sorry this isn't working for you. I'll try to find a solution,
>> although nothing immediately comes to mind. If I can duplicate the issue,
>> then I can help fix it. .
>>
>> Thank you,
>> -Mike
>>
>> On Tuesday, September 18, 2012 4:29:52 AM UTC-7, Ralph wrote:
>>>
>>> Hi,
>>>
>>> I also cannot get this working correctly. I have the following JARs in
>>> my classpath:
>>>
>>> - gdata-base.jar
>>> - gdata-core.jar
>>> - gdata-client.jar
>>> - gdata-client-meta.jar
>>> - gdata-photos.jar
>>> - gdata-photos-meta.jar
>>>
>>> Despite all this, when I call UserFeed.getEntries() I just get a list of
>>> GphotoEntry objects that are _not_ instances of AlbumEntry. The entry
>>> titles, however, do correspond to the titles of my albums. I'm using the
>>> API from a Google App Engine servlet by the way, not a client
>>> application. It looks like there's been a lot of silence regarding this
>>> topic and I also noticed that a lot of related questions on this forum do
>>> not get any answers. I hope somebody can reply so we can get this working.
>>> I'm planning on using the Picasa API for a commercial web application so
>>> it's quite important for me :)
>>>
>>> Greetz,
>>>
>>> Ralph
>>>
>>>
>>> On Monday, August 27, 2012 11:27:02 AM UTC+2, 李龙涛 wrote:
>>>>
>>>> 在 2011年5月15日星期日UTC+8下午9时44分15秒,[email protected]写道:
>>>> > Thanks! It works!
>>>>
>>>> I did so, but it still does not work, someone can help me?
>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"Google Picasa Web Albums API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-picasa-data-api/-/WQFu1c8MJS0J.
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.