hiii
I m developing application in j2me having functionality of saving to do list for particular date using PIM.....i hv written following code for to do list...but problem is that only note is going to save ....alarm is not going to set....this happens only for nokia phones....on sony ericssion it is working....is thr any problem in code??...
Thanx in advance...




import java.util.Date;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Display;
import javax.microedition.pim.PIM;
import javax.microedition.pim.PIMException;
import javax.microedition.pim.PIMItem;
import javax.microedition.pim.ToDo;
import javax.microedition.pim.ToDoList;

public class ToDoThread implements Runnable {


PIM pim=PIM.getInstance();
ToDoList el=null;
ToDo new_ToDo=null;

public void run()
{

try {
el=(ToDoList)pim.openPIMList(PIM.TODO_LIST, PIM.WRITE_ONLY);

System.out.println("PIM open");

} catch (PIMException e)
{

e.printStackTrace();
}


new_ToDo=el.createToDo();
if(el.isSupportedField(ToDo.DUE))
{
Date d=new Date();
long l=d.getTime()+(long)180000;
new_ToDo.addDate(ToDo.DUE, PIMItem.ATTR_NONE, l);
Alert obj = new Alert("","ToDo start",null,AlertType.INFO);
Display disp2 = Display.getDisplay(SMSMIDlet.midlet);
disp2.setCurrent(obj);
obj.setTimeout(5000);

}
if(el.isSupportedField(ToDo.PRIORITY))
{
new_ToDo.addInt(ToDo.PRIORITY, PIMItem.ATTR_NONE, 5);
// Alert obj = new Alert("","alarm start",null,AlertType.INFO);
//Display disp2 = Display.getDisplay(TodoPIM pim=PIM.getInstance();

}

if(el.isSupportedField(ToDo.SUMMARY))
{
System.out.println("Before summary");
new_ToDo.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, "Summary added for TODO");
System.out.println("after summary");
}

if(el.isSupportedField(ToDo.NOTE))
{
System.out.println("Before note");
new_ToDo.addString(ToDo.NOTE, PIMItem.ATTR_NONE, "note added for TODO");
System.out.println("After note");
}

try {
new_ToDo.commit();
} catch (PIMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
el.close();
} catch (PIMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}

}