Massively explains Warhammer Online to the dedicated WoW player

How to use BlackBerry JDE to create a calendar event

Linked below, a new BlackBerry Knowledge Base Document offers instructions for working within the BlackBerry Java Development Environment to create an Event within the BlackBerry Calendar application.

This is possible because BlackBerry JDE 4.0 offers the personal digital assistance profile (PDAP) package to provide allow access to the Calendar, Tasks, and Address Book applications on the BlackBerry device.

Included within the net.rim.blackberry.api.pdap package is the BlackBerryEvent interface, This interface defines extended fields in the event, along with the standard fields obtained through the javax.microediition.pim.Event interface.

Want sample code? Turn the page (just thought of that old Bob Seger song as I typed that).

Well anyway:

EventList _eventList = null;
try {
// Creates/Opens an instance of the specified PIM list (Event List) in Read/Write mode.
_eventList = (EventList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);

// Creates a new Event
BlackBerryEvent bbEvent = (BlackBerryEvent)_eventList.createEvent();



// Checks the Event List to determine if the ALLDAY field is supported
if(_eventList.isSupportedField(BlackBerryEvent.ALLDAY)) {
// Checks the event to determine if ALLDAY attribute as already be set
if(bbEvent.countValues(BlackBerryEvent.ALLDAY) > 0) {
bbEvent.setBoolean(BlackBerryEvent.ALLDAY,0,Event.ATTR_NONE,true);
} else {
bbEvent.addBoolean(BlackBerryEvent.ALLDAY,Event.ATTR_NONE,true);
}
}
} catch(PIMException e) {
// Handle Exception

K, got that?

General
Blackberry Multimedia (102)
Patents (38)
Rumors (116)
BlackBerry Internet Service (11)
Ask BBHUB (8)
BlackBerry OS 4.x (103)
BlackBerry Enterprise Server (327)
Competitors (280)
Fun (720)
Gear (191)
Health (94)
RIM (1198)
Promotions (172)
Security (201)
Software (1150)
Support (390)
Stories (768)
Tips (470)
Developers (13)
Providers
Bell Canada (5)
Cingular-AT&T (313)
International (213)
Miscellaneous (30)
Nextel (95)
Rogers Communications (58)
Sprint (60)
SprintNextel (61)
T-Mobile (211)
Verizon (98)
Vodafone (43)
Models
8703 (23)
8705 (3)
8707 (3)
8800 (28)
Pearl 8100 (314)
7100i (25)
7130e (71)
8700 (264)
7100 (55)
7100t (94)
7100g (95)
7100r (41)
7100x (29)
7100v (49)
7700 (10)
7730 (26)
7750 (27)
7780 (17)
7500 (11)
7510 (22)
7520 (86)
7200 (15)
7230 (42)
7250 (71)
7270 (22)
7280 (27)
7290 (119)
6700 (5)
6710 (7)
6720 (6)
6750 (9)
6200 (6)
6220 (6)
6230 (7)
6280 (6)
5800 (5)
5820 (5)
RIM Partners
3COM (3)
Nortel (4)
Siemens (4)
Sony Ericsson (9)
Features
Interviews (5)
Hardware Hacks (4)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Other Weblogs Inc. Network blogs you might be interested in: