Skip to content

Nonstandard Parameters

Mike Angstadt edited this page Jun 24, 2017 · 2 revisions

iCalendar objects can contain non-standard parameters that are not part of the iCal specification. These are called "experimental" parameters.

The iCalendar object below contains an example of such a parameter. It is called "X-APP-VERISON" and is located within the PRODID property (note that the names of experimental parameters must begin with "X-").

BEGIN:VCALENDAR
PRODID;X-APP-VERSION=10.3:-//Company//Application//EN
VERSION:2.0
END:VCALENDAR

1 Retrieving Experimental Parameters

To get an experimental parameter, call the getParameter(String) method on the property that the parameter belongs to. This returns a string containing the parameter value.

ICalendar ical = ...
String value = ical.getProductId().getParameter("X-APP-VERSION");

2 Creating Experimental Parameters

To add an experimental parameter to a property, call the setParameter(String,String) method.

ICalendar ical = ...
ical.getProductId().setParameter("X-APP-VERSION", "10.3");
Clone this wiki locally