Help Center
Local Navigation
- Integrating with BlackBerry Device Software applications
- Unified search
- Device interaction support
- Message list
- Custom messages
- Attachments
-
Calendar
- Open the calendar
- View or change a calendar entry
- Open a new populated calendar entry
- Update calendar entry information
- Retrieve calendar entry information
- Export a calendar entry
- Import a calendar entry
- Retrieve multiple lists of calendar entries
- Notify a BlackBerry device application when a list of calendar entries changes
- Notify a BlackBerry device application when the default list of calendar entries changes
- Update a calendar entry with no notification
- Remove a calendar entry with no notification
- Contact list
- Task list
- Phone
- BlackBerry Browser
- Menu items
- Find more information
- Glossary
- Provide feedback
- Document revision history
- Legal notice
BlackBerry Manuals & Help
>
Developer Documentation
>
Java Development Guides and API Reference
>
Development Guide
Integration - BlackBerry Java SDK - 6.0
Retrieve calendar entry information
- Import the required classes and interfaces.
javax.microedition.pim.Event javax.microedition.pim.EventList javax.microedition.pim.PIM
- Invoke EventList.items()
to retrieve an enumeration of appointments.
EventList eventList = (EventList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_ONLY); Enumeration e = eventList.items();
- Invoke PIMItem.getFields()
to retrieve an array of IDs of fields that have data for a particular task. Invoke PIMItem.getString()
to retrieve the field values.
while (e.hasMoreElements()) { Event event = (Event)e.nextElement(); int[] fieldIds = event.getFields(); int id; for(int index = 0; index < fieldIds.length; ++index) { id = fieldIds[index]; if(e.getPIMList().getFieldDataType(id) == STRING) { for(int j=0; j < event.countValues(id); ++j) { String value = event.getString(id, j); System.out.println(event.getFieldLable(id) + "=" + value); } } } }
Next topic: Export a calendar entry
Previous topic: Update calendar entry information