I want to create alarm inside an application at a particular Date & Time. It should display its description when it's time elapses which can be editable. And it should display only description and should not contain other details such as "Mark As Private", "Conference Call" etc..
Alarm is a type if Event. To retrieve events you should use the following:
EventList list = (EventList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
Then use method items(int searchType, long startDate, long endDate, boolean initialEventOnly)
to iterate over events:
for(Enumeration e = list.items(EventList.STARTING, startDate, endDate, false); e.hasMoreElements; ) {
Event event = (Event)e.nextElement();
if (sholdBeChanged()) {
Event event2 = list.createEvent();
// initialize fields of event2. Probably copy them from event
list.removeEvent(event);
break;
}
}
For more information refer to
http://developers.sun.com/mobility/apis/articles/pim/index.html