Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

New Developer
Posts: 13
Registered: ‎08-04-2008
My Device: Not Specified

Remote GAL Lookup not work

I wrote my code following by the document :http://www.blackberry.com/developers/docs/4.7.0api/PIM-summary.html#PIM5

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().openPIMList(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.nextElement()); ++count; } System.out.println("Number of Contacts: " + count); }


    Any suggestion?


BlackBerry Development Advisor
Posts: 15,813
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Remote GAL Lookup not work

What do you mean by doesn't invoke?  Is it blocking on the lookup method?  Or are you not getting any results returned?  Is an exception thrown?  Can you perform a look up from the Messages application?  What BlackBerry Smartphone model and BlackBerry handheld software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.  What version of BlackBerry Enterprise Server are you testing with?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.