On 7 Apr., 14:07, "vijay shanker" <[EMAIL PROTECTED]> wrote:
> Hi Group.
>
> I am working on a calendaring application in which I need to import Google
> Calendars of the registered users. Is there any way by which we can fetch
> the Icalendar representation of Google calendar events programmatically?
>
> I understand that Google calendar's events can be fetched using GData and
> Java client library. But I am just exploring the possibilities of an
> Icalendar format. This way I will save myself from the data conversion task.
>
> Cheers,
>
> Vijay

i had the same problem,
my solution: i copy&pasted the private url of the calendar (which
points to a ics file, with all the events of the primary and secondary
calendars), and used an inputstream from this link to build my
calendar. this solution uses java, ical4j, and the google-apis.


                myService = new CalendarService("foo");
                myService.setUserCredentials(username, password);
                link=new Link();
                link.setHref(privateCalendarUrl.toString());
                calendar= new Calendar();
                builder= new CalendarBuilder();
 
calendar=builder.build(myService.getStreamFromLink(link));

All you would have to do at this point is to write the calendar object
on your disk with an fileoutputstream, utilizing the ical4j Outputter-
Type.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to