Notify a BlackBerry device application when a list of calendar entries changes

  1. Import the required classes and interfaces.
    import javax.microedition.pim.EventList;
    import javax.microedition.pim.PIM;
    import net.rim.blackberry.api.pdap.BlackBerryPIMList;
    import net.rim.blackberry.api.pdap.PIMListListener;
    
  2. Implement the PIMListListener interface.
    public class MyEventListListener implements PIMListListener {...}
  3. Invoke BlackBerryPIMList.addListener() to register to receive notifications of changes to a list of calendar entries.
    BlackBerryPIMList eventList = (BlackBerryPIMList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
    eventList.addListener(new MyEventListListener());

Was this information helpful? Send us your comments.