02-10-2012 04:13 PM
Hello,
Please help me.
Objective: Get all email address listed in a Contact group name "XYZ"
Env: BB JRE 6.0.0
Code:
bbContactList = (BlackBerryContactList) PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
Enumeration allGroups = bbContactList.items(BlackBerryContactList.SEARCH_G
_vbbGroups = enumToVector(allGroups);
BlackBerryContactGroup bbSelectedGroup = (BlackBerryContactGroup)_vbbGroups.elementAt(0);
System.out.println(" Number of contact in group " + bbSelectedGroup.getString(BlackBerryContactGroup.N
//Output says 5 contacts in group named WORK
int atrCount=0;
String emailAddr;
String phoneNo;
for(i=0; i < bbSelectedGroup.countValues(BlackBerryContactGroup
emailAddr = bbSelectedGroup.getString(BlackBerryContactGroup.A
System.out.println( " %%%%%% " + emailAddr );
}
//Output - Crash
ContactGroupImpl.countValues(int) line: 88
ContactScreen.getContactList() line: 180 ->This line refer to for loop statement
I tried to get number of contacts which are of type email address.Becz out of 5 contact added in group 2 are telephone and three are email address.
Please provide an idea what is happening wrong?