Add Calendar Event
The webOS Calendar app exposes a cross-application API allowing you to add a new event on the user's behalf.
To do so, you construct an Event object and then use the Application Manager's open
method to launch the Calendar app, passing it the object you have created. The Calendar app will create a new event and display a scene allowing the user to make edits or additions as needed.
See Also:
Example
this.controller.serviceRequest("palm://com.palm.applicationManager", {
method: "open",
parameters:
{
id: "com.palm.app.calendar",
params:
{
newEvent: {
subject: 'Take daily medicine', // string
dtstart: '1290711600000', // string representing the start date/time as timestamp in milliseconds
dtend: '1290718800000', // string representing the end date/time as timestamp in milliseconds
location: 'Wherever I am!', // string
rrule: {
freq: "DAILY",
count: 3
}, // rrule object -- see Calendar schema for details
tzId: "America/Los_Angeles", // string representing a standard Olson timezone name
alarm: [
{
alarmTrigger: {
valueType: "DURATION",
value: "-PT15M"
}
}
], // array of alarm objects -- see Calendar schema for details
note: 'Take alergy medicine, 1 pill', // string
allDay: false // boolean
}
}
}
});
}