BlackBerry - Programmatically fetching data in calendar

Posted by SWATI on Stack Overflow See other posts from Stack Overflow or by SWATI
Published on 2010-03-24T08:56:53Z Indexed on 2010/03/24 9:43 UTC
Read the original article Hit count: 350

Filed under:
|
|

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);
  }

© Stack Overflow or respective owner

Related posts about blackberry

Related posts about calendar