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

Reply
Regular Contributor
pgoeol
Posts: 55
Registered: ‎02-17-2010
My Device: BB8100
My Carrier: Airtel
Accepted Solution

Push listener port conflict

Hi,

 

I'm developing an application with push support, I've a background application which listens for push requests and a UI application.

My application is working fine on BES but I want to provide another feature to notify user whether the specified port is available or not. If the port is already bound then which application has acquired this port. Is there any API to find out the application name which is listening on a port?

 

Awaiting for your reply !!!

 

Regards,

Pulkit

Please use plain text.
Developer
simon_hain
Posts: 16,089
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Push listener port conflict

no, there is no such api. in my software i just try some more ports

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
pgoeol
Posts: 55
Registered: ‎02-17-2010
My Device: BB8100
My Carrier: Airtel

Re: Push listener port conflict

Thanks for replyin Simon.

 

I know that there is no api to find out free port, but I want to display a error message to user if my app got PortBoundException along with the name of the other application which is using the same port. It will help the user to know the exact issue. I dont know how i can determine the application name, if you do then please tell me.

 

Regards,

Pulkit

Please use plain text.
Developer
simon_hain
Posts: 16,089
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Push listener port conflict

no, there (still) is no such api.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
pgoeol
Posts: 55
Registered: ‎02-17-2010
My Device: BB8100
My Carrier: Airtel

Re: Push listener port conflict

Thanks for confirming that there is no such API.

 

One more thing, my application is an autostart app and it registers for the listening port at each device reboot. So, if my application has acquired a port once then is it possible for another to acquire same port after rebooting the device?

 

Regards,

Pulkit

Please use plain text.
Developer
simon_hain
Posts: 16,089
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Push listener port conflict

yes, a reboot deletes all aquired ports

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.