07-02-2009 01:57 AM
I wrote my code following by the document :http://www.blackberry.com/developers/docs/4.7.0api
in order to lookup the contact list remotely from BES,
But the items method doesn't invoke?
the code is:
try { BlackBerryContactList contactList = (BlackBerryContactList)PIM.getInstance().openPIMLi
st(PIM.CONTACT_LIST, PIM.WRITE_ONLY); contactList.lookup(key,this); } catch (Exception ex) { System.out.println(ex.toString()); } public void items(Enumeration results) { int count = 0; while (results.hasMoreElements()){ this._vecLookupContacts.addElement(results.nextEle
ment()); ++count; } System.out.println("Number of Contacts: " + count); }
Any suggestion?
07-03-2009 03:15 PM