05-27-2009 05:12 AM - edited 05-27-2009 08:00 AM
Hi friends,
Can I copy the blackberry calender event to my application?, How?
Thanks in advances
Solved! Go to Solution.
05-28-2009 01:40 PM
Hi,
yes you can read the calendar events thruogh PIM interface and Evetlist class.
Below is the sample code.For more info read the EventList API documentation.
EventList eventList = (EventList)PIM.getInstance().openPIMList(
PIM.EVENT_LIST, PIM.READ_ONLY);
Enumeration e = eventList.items();
while (e.hasMoreElements()) {
Event event = (Event)e.nextElement();
int[] fieldIds = event.getFields();
int id;
for(int index = 0; index < fieldIds.length; ++index) {
id = fieldIds[index];
if(e.getPIMList().getFieldDataType(id) == STRING) {
for(int j=0; j < event.countValues(id); ++j) {
String value = event.getString(id, j);
System.out.println(event.getFieldLable(id) + "=" + value);
}
Please Cick on "Accept solution" if your problem is solved.
thanks
07-11-2012 06:34 AM
what is STRING here