PIM 返回的 BlackBerry 日历事件列表有时为空

发布于 2024-09-09 04:38:04 字数 475 浏览 6 评论 0原文

此问题与 BlackBerry SDK 上的 PIM 包有关。同步完成后,我需要更新设备上的日历事件。为了检查新事件是否真的是新的,我执行以下调用:

 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);

然后,我根据此“事件”列表检查传入事件。如果在那里找不到传入事件,我会将其添加到 BB 日历中。这应该是为了防止 BB 日历中的事件重复。问题是这两条线有时无法正常工作。这意味着,有时“事件”列表为空(但 BB 日历包含这些事件!),这会导致 BB 日历中的事件重复(三重、四重等)。 有人遇到过这个问题吗?如果是的话如何解决?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

习惯成性 2024-09-16 04:38:04

最后我找到了 Outlook 事件重复的原因是什么。在与全局数据库同步期间,我们根据通过 PIM 接口提供的 BB 事件列表检查传入事件。如果在此列表中未找到传入事件,我们会再次使用 PIM 界面将其添加到日历中。问题是,如果事件发生的时间早于事件过期时间,BB 日历服务会自动将其从日历中删除。常规日历选项中有一个名为“保留约会”的设置,默认为 60 天。我们的想法是对照此时间段检查传入事件,如果事件不在日历中并且“保留”时间段已过期,则不要再次将其添加到日历中。因此,我们需要弄清楚“保留预约”设置是什么。我们可以使用 PIM 或任何其他接口来做到这一点吗?

Finally I found what is the reason for Outlook events duplication. During synchronization with global database we check incoming events against BB event list provided through PIM interface. If incoming event not found in this list we add it to the calendar using PIM interface again. The problem is that if event occurred more than event expiration period ago than BB calendar service automatically deletes it from calendar. There is a setting in General Calendar Options called “Keep Appointments” which is defaulted to 60 days. Our idea is to check incoming event against this period and if event is not in calendar and it’s “Keep” period expired then not to add it to calendar again. So, we need for that to figure out what is this “Keep Appointments” setting. Can we do it using PIM or any other interface?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文