_vec = (Vector)_listenerHash.get(eventService);
_vec.addElement(callback);
_listenerHash.put(eventService, _vec);
}// end if (_listenerHash.get(eventService)==null)
BlackBerryPIMList eventList = (BlackBerryPIMList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
eventList.addListener(new AptListener(eventService));
// callback.invoke(null, new Object[] { "added listener" });
}// end of if (!eventService.equalsIgnoreCase("")){
else {
// callback.invoke(null, new Object[] { "event service empty" });
// if the eventService is NOT provided, i.e., eventService= ""
if (_listenerHash.get(eventService)==null) {
_listener = new AptListener(eventService);
_vec = new Vector();
_vec.addElement(callback);
_listenerHash.put(eventService, _vec );
}else{
_vec = (Vector)_listenerHash.get(eventService);
_vec.addElement(callback);
_listenerHash.put(eventService, _vec);
}
BlackBerryPIMList eventList = (BlackBerryPIMList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
eventList.addListener(_listener);
}
}catch (Exception ex){
try{
callback.invoke(null, new Object[] {ex.getMessage()});