Widget Resources

Calendar Widget API
Technical Docs Nov 11, 2010
0

1. Description

A calendar is a collection of events. The BONDI Calendar API provides access to the calendars and events stored in the native device. API provides functionality to read, create, delete and update events in specific calendars.

Calendar can be obtained using the getCalendars method which returns an array of calendar objects. An event is an appointment in the calendar with a start time, end time, duration, and location and recurrence indicator.

The recurrence indicator of an event will be set using one of the constants defined in the API.

  • NO_RECURRENCE
  • DAILY_RECURRENCE
  • WEEKLY_RECURRENCE
  • MONTHLY_RECURRENCE
  • YEARLY_RECURRENCE

2. Calendar Manager

The Calendar Manager interface offers methods to retrieve calendars. API can manage different calendars stored in the device.

Finding events using a filter is also supported with the method findEvents. The supported properties are returned by the event class method getSupportedPropertyKeys. These supported keys are valid for the createEvent and/or updateEvent method.

Interface provides methods to: Find events using a key-value filter. Keys supported by this method are returned by the getSupportedPropertyKey method of the event class Add an event to a specific calendar using addEvent method. Update an existing event using updateEvent method. Delete an existing event using deleteEvent method. Clear all events of a specific calendar with clearEvents method.

Calendar Manager

3. Add Event Method

CreateEvent method creates an event object. The following example shows how to create an event

Addevent adds an event to the calendar.

Add Events to the Calendar


go to top