Hi,
It does appear that your code is doing the right thing. Perhaps try
running this code without the date query to see if it prints out the
start/end times of other events in your calendar. Maybe there is
something different about those particularly events within that date
range.
Austin
On Oct 3, 4:13 am, maver <[EMAIL PROTECTED]> wrote:
> Hello, I have a problem with the getTimes() method of the
> CalendarEventEntry class. It always returns an empty List<When>. Here
> is my code:
>
> public ArrayList<Date[]> getUserEntryDates(Date fromDate) throws
> IOException, ServiceException {
> ArrayList<Date[]> dates = new ArrayList<Date[]>();
> CalendarQuery query = new CalendarQuery(feedUrl);
> query.setMinimumStartTime(getGoogleDate(fromDate));
> CalendarEventFeed resultFeed = calendarService.query(query,
> CalendarEventFeed.class);
> CalendarEventEntry entry;
> Date[] d;
> for (int i = 0; i < resultFeed.getEntries().size(); i++) {
> entry = resultFeed.getEntries().get(i);
> System.out.println("getting dates from " +
> entry.getTitle().getPlainText());
> if (!isSPEntry(entry)) {
> System.out.println("getting dates from " +
> entry.getTitle().getPlainText());
> java.util.List<When> times = entry.getTimes();
> System.out.println(times.size());
> for (int k = 0; k < entry.getTimes().size(); k++) {
> d = new Date[2];
> d[0] =
> getDate(entry.getTimes().get(k).getStartTime());
> d[1] =
> getDate(entry.getTimes().get(k).getEndTime());
> System.out.println(d[0]);
> dates.add(d);
> }
> }
> }
> return dates;
> }
>
> System.out.println(times.size()); always prints 0
>
> And this is my feed:
> feedUrl = new URL(
> "http://www.google.com/calendar/feeds/" +
> user.googleAccount() +
> "/private/full");
>
> Its not basic. Any help would be great.
>
> Thank you,
> Maver
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data 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-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---