Open budbachman opened 4 years ago
Hello there,
I will answer your question a bit late but hopes it helps you or someone else. I've added alarms successfully in the following way:
Alarm reminder = new Alarm
{
Summary = title,
Action = AlarmAction.Display,
Trigger = new Trigger(TimeSpan.FromHours(-15)), // 9 AM the day before
};
var e = new CalendarEvent
{
Description = description,
Summary = title,
Uid = $"test",
Start = new CalDateTime(date.Value),
IsAllDay = true,
Alarms = { reminder }
};
With that code I've set an alarm for 9 AM the day before the event. If you want an alarm for 30 minutes before the event use TimeSpan.FromMinutes(-30)
.
Hope that helps.
I'm not seeing how to add the VALARM to the Event. The Alarms mechanism is used to read Alarms, not set them. I created the Alarm and created the event. So, how do I get the Alarm to show up within the event? Here is my code so far:
How do I move forward?