自定义原生黑莓日历活动

时间:2011-12-20 07:27:49

标签: blackberry calendar

如何在原生黑莓日历上创建自定义事件,我可以阅读,编写和修改。我可以在日历上添加自定义菜单字段,但是从那里我想在日历上添加自定义字段的自定义事件。

1 个答案:

答案 0 :(得分:2)

EventList eventList = (EventList) PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.WRITE_ONLY);
_event = eventList.createEvent();
_event.addString(Event.SUMMARY, PIMItem.ATTR_NONE,"Event Name");
_event.addDate(Event.START, PIMItem.ATTR_NONE, "Event Date in long format");
RepeatRule rule = new RepeatRule();
rule.setInt(RepeatRule.FREQUENCY,RepeatRule.YEARLY);// There is many options in RepeatRule like Daily,Weakly,Monthly,Yearly, ect...
_event.setRepeat(rule);
_event.commit();