I am using below code to create a reminder in Google calendar (using Google API ver 2 for c# ):
EventEntry entry = new EventEntry();
entry.Title.Text = "testing from .NET";
entry.Content.Content = "testing from .NET";
String recurData =
"DTSTART;TZID=America/Los_Angeles:20071202T080000\r\n" +
"DTEND;TZID=America/Los_Angeles:20071202T090000\r\n" +
"RRULE:FREQ=WEEKLY;WKST=SU;UNTIL=20071230T160000Z;BYDAY=SU\r\n";
Recurrence recurrence = new Recurrence();
recurrence.Value = recurData;
entry.Recurrence = recurrence;
Reminder reminder = new Reminder();
reminder.Minutes = 15;
reminder.Method = Reminder.ReminderMethod.all;
entry.Reminders.Add(reminder);
Getting Error : Object reference not set to an instance of an object.
Thanx
Does the entry exist? If so, does Reminders exist? (I mean both not NULL)
Judging from the api link. You have to add the event to the calendar before setting reminders:
see this
Note I haven’t worked with the Google API so I can’t garantee if it works or not. You should debug the application and see the value of EventEntry and Reminders