×

Discussion Board

Results 1 to 2 of 2

Thread: PIM API Again

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    15

    Question PIM API Again

    Hi,

    I'm trying to make an application that can add Event to build-in Calendar. For this purpose, I use J2ME PIM Profile. For adding event to Calendar, it can be done successfuly. But when I try to remove event in Calendar that I had add via application, it still cannot be done.

    I use this code to remove the event :

    try {
    pim = PIM.getInstance();
    et = (EventList) pim.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
    event = et.createEvent();

    for (Enumeration el = et.items(EventList.OCCURRING, myTime-1, myTime+1, false); el.hasMoreElements(); ){
    event = (Event)el.nextElement();
    if (et.isSupportedField(Event.SUMMARY))
    event.removeValue (Event.SUMMARY, 0);
    if (et.isSupportedField(Event.START))
    event.removeValue (Event.START, 0);
    if (et.isSupportedField(Event.END))
    event.removeValue (Event.END, 0);
    if (et.isSupportedField(Event.ALARM))
    event.removeValue (Event.ALARM, 0);
    if (et.isSupportedField(Event.NOTE))
    event.removeValue (Event.NOTE, 0);
    System.out.println ("commiting");
    event.commit();
    et.removeEvent(event);
    si.setText ("remove success");
    }
    et.close();
    }
    catch (Exception e) {
    System.out.println ("Exception : " + e.toString());
    si.setText (e.toString() + " : " + x);
    }

    Does anyone has experience in PIM API? Help me to get the answer of my problem, please....


    Thank you....

  2. #2
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    89

    hi

    hi
    May i know how to use the j2me PIM coz i want store the file on mobile device.?

    Thanx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×