Notify a BlackBerry device application when a list of tasks changes

  1. Import the required classes and interfaces.
    import javax.microedition.pim.PIM;
    import net.rim.blackberry.api.pdap.PIMListListener;
    import net.rim.blackberry.api.pdap.BlackBeryPIMList;
    
  2. Implement the PIMListListener interface.
    class MyTaskListListener implements PIMListListener {...}
  3. Invoke BlackBerryPIMList.addListener() to register to receive notifications of changes to a task list.
    BlackBerryPIMList taskList = 
       (BlackBerryPIMList)PIM.getInstance().openPIMList(PIM.TODO_LIST, 
       PIM.READ_WRITE);
    taskList.addListener(new MyTaskListListener());
Next topic: Phone
Previous topic: Close the task list

Was this information helpful? Send us your comments.