How do i get raw ics (google calendar) file from Google Calendar API

624 Views Asked by At

Here is my example code:

String eventId = "XXX";
String calendarId = "YYY";

outputStream = new FileOutputStream("C:\\Users\\AAA\\Documents\\notepads\\output-text.ics");     
calendarService.events().get(calendarId, eventId).executeAndDownloadTo(outputStream);

This is giving a JSON output. I need to convert event into an .ics file, is there any ways to do it..? or do i need to construct it manually..? Thanks in advance

0

There are 0 best solutions below