If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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.

Reply
Contributor
rreiss
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

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
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!
Please use plain text.
Contributor
rreiss
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

 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
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!
Please use plain text.
Contributor
rreiss
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

Please use plain text.
Contributor
rreiss
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

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
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!
Please use plain text.
Contributor
rreiss
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

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
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!
Please use plain text.
Contributor
rreiss
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

Please use plain text.