This problem is related to PIM package on BlackBerry SDK. I need to update calendar events on the device after synchronization is done. To check if new event is really new I do this call:
EventList eventList = (EventList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
Enumeration events = eventList.items(EventList.OCCURRING, Long.MIN_VALUE, Long.MAX_VALUE, true);
And after that I check incoming events against this 'events' list. If incoming event not found there I add it to the BB calendar. This supposed to prevent event duplication in the BB calendar. The problem is that those two lines do not work properly sometimes. That means, sometimes the 'events' list is empty (but the BB calendar contains those events!) and this cause event duplication (triplication, quadruplication etc.) in BB calendar. Does anybody had this problem and if yes how to fix it?