I am reading about PIM and try to write a program that will make alarm after some time preriod from the current time.
But the program do not produce any sound and any display.
What is the problem?
Code:if(c==cmdEventcreate) { PIM pim; EventList eventlist=null; Event event; pim=PIM.getInstance(); try { eventlist=(EventList) pim.openPIMList(PIM.EVENT_LIST, PIM.WRITE_ONLY); } catch (PIMException e) { // TODO Auto-generated catch block e.printStackTrace(); } event=eventlist.createEvent(); if(eventlist.isSupportedField(Event.START)) { Date date=new Date(); long l=date.getTime()+ 6; event.addDate(Event.START, Event.ATTR_NONE, l); } if(eventlist.isSupportedField(Event.ALARM)) event.addInt(Event.ALARM, Event.ATTR_NONE, 600); event.addString(Event.SUMMARY,Event.ATTR_NONE, "Please "); try { event.commit(); System.out.println(event.countValues(Event.ALARM)); System.out.println(event.countValues(Event.START)); } catch (PIMException e) { // TODO Auyo-generated catch block e.printStackTrace(); } }//if(c==cmdEvnetcreate)

Reply With Quote


