i have invoked blackberry calender from my application
can anyone tell me how to fetch :
- date
- duration
- notes
from the selected date
my code :
MenuItem importCalender = new MenuItem("Import from Calender",100,11)
{
public void run()
{
UiApplication.getUiApplication().invokeAndWait(new Runnable()
{
public void run()
{
try
{
EventList list = (EventList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
Enumeration events = list.items();
BlackBerryEvent e = (BlackBerryEvent) events.nextElement();
Invoke.invokeApplication(Invoke.APP_TYPE_CALENDAR, new CalendarArguments( CalendarArguments.ARG_VIEW_DEFAULT,e) );
}
catch (PIMException e)
{
//e.printStackTrace();
}
}
});
}
};
protected void makeMenu(Menu menu, int instance)
{
menu.add(importCalender);
}