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

Java Development


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
Highlighted
New Developer
Posts: 12
Registered: ‎08-06-2008
My Device: Not Specified
Accepted Solution

2 Application try to comunicate with BES

Hello, I'm trying to get the ECL Demo 2 times runable on my device. I copied the demo (one time for the Device and at the server too) and changed only the port.

There are now to ListenerThreads which hear both on the 8080 from the server an there are a second port at the Server and there is 1 database with 915 and 1 with 911. And at the Device si also 1 with 915 and 1 with 911.

 

With 2 ports i mean this. 

 

URL url = new URL("http","localhost",8080,"/push?DESTINATION=2100000F&PORT=915&REQUESTURI=/");

 

the destination is here only an example. 

 

and the Listener thread has this code.

 

(StreamConnectionNotifier)Connector.open(http://:915);

 

And than come other code to get the data. 

 

Now my Problem if i have only 1 application on program on the device then i get both pushes to this program. And if i have both programs on the device then i get both pushes at only 1 program. It is like the listener doesn't look to the second port he has to listen. 

 

Can anyone help me please?? 

 

MfG Jagge 

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

Re: 2 Application try to comunicate with BES

Have you also changed the persistent store IDs?  If not each application could be receiving its own push, but storing the data in the same location.  Meaning both applications are writing to and reading from the same persistent object, resulting in the same data showing up in both applications.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Developer
Posts: 12
Registered: ‎08-06-2008
My Device: Not Specified

Re: 2 Application try to comunicate with BES

Yes i changed the ID at the last number. 
BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: 2 Application try to comunicate with BES

I recommend connecting the BlackBerry to the BlackBerry JDE and select some break points in the two applications to walk through what is actually occuring.

 

To do so connect the BlackBerry via USB and in the BlackBerry JDE click on the Debug menu, select Attach to, Device and then select your PIN.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Developer
Posts: 12
Registered: ‎08-06-2008
My Device: Not Specified

Re: 2 Application try to comunicate with BES

I Solved the Problem!!!

It was because i copied the project in Notes. There was then 2 classes named DominoPusher. And i think if Notes uses a class it saves the class and if a other program uses the same classname then it uses the same class and not the class from the project.   

But thx for the other tips

 

MfG Jagge