Welcome!

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

BlackBerry Web Services


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.


Reply
Contributor
Posts: 27
Registered: ‎01-21-2011
My Device: Bold 9900
My Carrier: Cellcom
Accepted Solution

BES remote lookup isn't invoking items().

Hey,

I'm trying to make a remote search on a blackberry BES server, but the 'RemoteLookupListener' isn't getting a response on 'items()';

>>Link to my code

 

The built in BB Remote Contact Lookup is working fine if you wonder..

 

Thanks, Rotem

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: BES remote lookup isn't invoking items().

Hi Rotem,

 

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?

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Highlighted
Contributor
Posts: 27
Registered: ‎01-21-2011
My Device: Bold 9900
My Carrier: Cellcom

Re: BES remote lookup isn't invoking items().

Hi,

 

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:

  • Core version 1.5
  • BlackBerry Java SDK 7.0.0.33
  • Eclipse SDK 3.6

Thanks,

Rotem

 

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: BES remote lookup isn't invoking items().

What's the full OS version on your device (ex 7.1.0.123)?

Do you have another device active on the same BES that you could test this against?

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 27
Registered: ‎01-21-2011
My Device: Bold 9900
My Carrier: Cellcom

Re: BES remote lookup isn't invoking items().

7.1.0.342(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.

 

Thanks,

Rotem

Contributor
Posts: 27
Registered: ‎01-21-2011
My Device: Bold 9900
My Carrier: Cellcom

Re: BES remote lookup isn't invoking items().

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..)

 

Any way,

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 = "";

while (results.hasMoreElements())
{
Contact con = (Contact) results;
names += con.getString(Contact.NAME, 0);
names += "\n";
results.nextElement();
++count;
}

cntFld.setText("Number of Contacts: " + count + "\n" + names);
}

 

Thanks again,

Rotem

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: BES remote lookup isn't invoking items().

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();

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 27
Registered: ‎01-21-2011
My Device: Bold 9900
My Carrier: Cellcom

Re: BES remote lookup isn't invoking items().

OK,

What about this code?

http://codeviewer.org/view/code:26ba

 

I fixed the cast issue, but still not working..

I'm realy lost..

 

Thanks,

Rotem

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: BES remote lookup isn't invoking items().

Hi Rotem,

 

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.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 27
Registered: ‎01-21-2011
My Device: Bold 9900
My Carrier: Cellcom

Re: BES remote lookup isn't invoking items().

Hey,

 

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?

 

Thanks,

Rotem