Open a task list
- Import the required classes and interfaces.
import javax.microedition.pim.PIM;
import javax.microedition.pim.PIMException;
import javax.microedition.pim.ToDoList;
- Invoke PIM.openPIMList() and provide as parameters the type of list to open (PIM.TODO_LIST) and the access mode with which to open the list (READ_WRITE, READ_ONLY, or WRITE_ONLY).
ToDoList todoList = null;
try
{
todoList = (ToDoList)PIM.getInstance().openPIMList(PIM.TODO_LIST,
PIM.READ_WRITE);
}
catch (PimException e)
{
// handle exception here
}
Was this information helpful? Send us your comments.