Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
05-30-2012 04:58 AM
05-30-2012 10:44 AM
The code is working fine for me, it returned 94 found contacts.
Are you testing on a real device or simulator?
What is the device model and software version?
What SDK version are you using to compile?
05-31-2012 04:28 AM
I'm testing it on my device not on a simulator. (Bold 9900 OS 7.1)
I'm using BlackBerry Java Plug-in for Eclipse:
05-31-2012 07:07 AM
What's the full OS version on your device (ex 188.8.131.52)?
Do you have another device active on the same BES that you could test this against?
05-31-2012 07:24 AM
184.108.40.2062(1149), Is there any known issues with that version?
Lucky me - I'm working at a cellular opeartor so I'll test it with another devices (Bold 9700/9780),
It will take some time to do the enterprise activition so I'll update you after I'm done..
Altough I realy want to use it on my personal device.
05-31-2012 09:39 AM
OK, it is very strange..
I tried the app. on Bold 9780 and it worked, then I installed it again on my device and it also worked (altough it showed another number of contacts found..)
I added a few things to the items method and it isn't working again..
May you take a look?
public void items(Enumeration results)
int count = 0;
String names = "";
Contact con = (Contact) results;
names += con.getString(Contact.NAME, 0);
names += "\n";
cntFld.setText("Number of Contacts: " + count + "\n" + names);
05-31-2012 09:42 AM
You can't cast an Enumeration directly into a Contact object:
Contact con = (Contact) results;
You will need to iterate through:
Contact con = (Contact) results.nextElement();
05-31-2012 11:34 AM
Try it on the device that was working previously, if it works there then the code should be fine. It sounds like you may have a strange environment issue.
06-04-2012 02:34 AM
The lookup is now working just fine!
I have a few more questions:
1. Is it possible to look for a BES contact by it's phone number?
2. Is it possible to get contact's picture from Active Directory if it's connected to the BES?