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
View or change a calendar entry
- Import the required classes and interfaces.
import java.util.Enumeration; import javax.microedition.pim.PIM; import javax.microedition.pim.Event; import javax.microedition.pim.EventList; import net.rim.blackberry.api.invoke.CalendarArguments; import net.rim.blackberry.api.invoke.Invoke; import net.rim.device.api.system.ControlledAccessException;
- Retrieve an Event from the list of events.
Event e = null; EventList el = (EventList)PIM.getInstance().openPIMList( PIM.EVENT_LIST, PIM.READ_WRITE ); Enumeration events = el.items(); e = (Event)events.nextElement();
- Invoke Invoke.invokeApplication(APP_TYPE_CALENDAR, CalendarArguments) using the CalendarArguments object created using the ARG_VIEW_DEFAULT field and the retrieved Event.
Invoke.invokeApplication( Invoke.APP_TYPE_CALENDAR, new CalendarArguments( CalendarArguments.ARG_VIEW_DEFAULT, e ) );
- Check for a ControlledAccessException if your application does not have permission to access the application that it invokes.
Next topic: Open a new populated calendar entry
Previous topic: Open the calendar