Calendar

Creating an event

Here are the invocation attributes you use to launch a calendar card to create an event:

Attribute Value
Target ID

sys.pim.calendar.viewer.eventcreate

Action

bb.action.CREATE

MIME type

text/calendar

Description Data (optional)
Account ID of the event unsigned int accountId
Folder ID of the event unsigned int folderId

List of participant email addresses as a String

String Array
Subject of the event String subject
Body of the event String body
Start time of the event String startTime
Duration of the event int duration

Data must be sent as shown below:
var request:InvokeRequest = new InvokeRequest();
var str:String = "";
str += "accountId:n:1234\n";
str += "folderId:n:123\n";
str += "participants:json:"+JSON.stringify
    (["email1@site.com", "email2@site.com" ]) + "\n";
str += "subject::I am a subject\n";
str += "body::I am the body\n";
str += "startTime::" + "Tue Jan 10 13:00:00 2013" + "\n";
str += "duration:n:" + 30 + "\n";
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes( str );
request.data = ba;

Picking an existing event

Here are the invocation attributes you use to launch a calendar card to pick an existing event:

Attribute Value
Target ID

sys.pim.calendar.viewer.nav

Action

bb.calendar.PICK

MIME type

text/calendar

Card response:

Reason Data Description
Done Event data in VCS format This response is returned when the user picks an event, after which the card closes.

Editing an existing event

Here are the invocation attributes you use to launch a calendar card to edit an existing event:

Attribute Value
Target ID

sys.pim.calendar.viewer.eventcreate

Action

bb.calendar.EDIT

MIME type

text/calendar

Description Data
Account ID of the existing event unsigned int accountId
Folder ID of the event (optional) unsigned int folderId
Event ID unsigned int eventID
Start time of the event (optional) QString startTime

startTime lets you differentiate between any two or more recurring events that have the same eventID.

Viewing an .ics file

Here are the invocation attributes you use to launch a calendar card to view an .ics file:

Attribute Value
Target ID

sys.pim.calendar.viewer.ics

Action

bb.action.OPEN

MIME type

text/calendar

URI

file:///path/to/my/file/filename.ics

If you want to open the .ics file for a specific account, you can set an account ID in the data attribute of the invocation request.

Description Data (optional)
Account ID of the existing event unsigned int accountId

Data must be sent as shown below:
var request:InvokeRequest = new InvokeRequest();
var str:String = "";
str += "accountId:n:1234\n";
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes( str );
request.data = ba;

Opening the calendar app

Here are the invocation attributes you use to open the calendar app:

Attribute Value
Action bb.calendar.OPEN
MIME type text/calendar
Data

A query string written to a ByteArray

The query string object is in the following format:
var queryString:String = "?param1=value1&param2=value2";
The table below shows the valid query names and values for this invocation:

Query name Query value Description
view
  • monthly
  • agenda
  • people
  • schedule
  • weekly
Opens a specific view of the calendar app (for example, monthly view).
calendars
  • <account-id>-<folderId>
  • <account-id>-<syncId>
Opens the calendar app with only the specified calendars visible. You can enable multiple calendars by providing comma-separated list of <account-id>-<folderId> and <account-id>-<syncId>.
date Date must be in the following format: Wed Jun 13 2012 Opens the calendar view for the specified date.

Viewing an existing event

Here are the invocation attributes you use to launch a calendar card to view an existing event:

Attribute Value
Target ID

sys.pim.calendar.viewer.ics

Action

bb.calendar.OPEN

MIME type

text/calendar

Description Data (optional)
Account ID of the existing event unsigned int accountId
Event ID of the existing event unsigned int eventId
Start time of the existing event. You can use this attribute to distinguish between any recurring events that have the same event ID. String start

Data must be sent as shown below:
var request:InvokeRequest = new InvokeRequest();
var str:String = "";
str += "accountId:n:1234\n";
str += "eventId:n:123\n";
str += "start::2012-05-25 11:30:00\n"; 
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes( str );
request.data = ba;

Here are the invocation attributes you use to open the calendar app to view an existing event:

Attribute Value
Action bb.calendar.VIEW
MIME type text/calendar
Data

A query string written to a ByteArray

The query string object is in the following format:
var queryString:String = "?param1=value1&param2=value2";
The table below shows the valid query names and values for this invocation:

Query name Query value Description
accountId <account-id> Account ID of the event.
eventId <event-id> Event ID of the event.
date The start time must be in the following format: Wed Jun 13 09:39:56 2012 The start time of the event. This attribute is required only for recurring events to identify which of the events in a recurring event should be opened.