Java Reference
In-Depth Information
ContactList myContacts = PIM.openContactList (PIM.READ_WRITE);
Contact matchContact = myContacts.create();
matchContact.setString(Contact.FORMATTED_NAME, "John Smith ");
Enumeration enum = myContacts.elements(matchContact);
Contact myContact =(Contact)enum.nextElement();
myContacts.removeContact(myContact);
myContact.commit();
myContacts.close();
Calendar API
Similar to the addressbook API, the calendar API supports most of the fields specified by the
vCalendar in IETF RFC 2445. The calendar API supports two classes analogous to those in the
addressbook API.
The following code snippet shows a vCalendar entry:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
DTSTART:19970714T170000Z
DTEND:19970715T035959Z
SUMMARY:Bastille Day Party
END:VEVENT
END:VCALENDAR
As you can see, the format is very similar to the vCard format used in the addressbook API.
Note
More information about IETF RFC 2445 can be found at
http://www.nic.mil/ftp/rfc/rfc2445.txt
The calendar API supports two interfaces analogous to those in the addressbook API (one interface
extending the PIMElement interface and one interface derived from the PIMList interface,
providing access to an event database).
Here the corresponding interfaces are the Event interface for a particular element and the
EventList interface, providing the necessary methods to access an event database.
Contact s and Event s support different field IDs. The calendar API supports two interfaces
analogous to those in the addressbook API (one interface extending the PIMElement interface and
one interface derived from the PIMList interface, providing access to an event database).
Here the corresponding interfaces are the Event interface for a particular element and the
EventList interface, providing the necessary methods to access an event database.
Repetition of Events
 
Search WWH ::




Custom Search