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
Developer
Posts: 28
Registered: ‎03-12-2009
My Device: Not Specified
Accepted Solution

Connection timeout at Connector.open(..)

Hi.

I`m trying to play streaming media as described in DB-00612 (http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To...).

 I`ve found that opening the stream doesn`work as i have ConnectionTimeout

 

s = (ContentConnection) Connector.open(getLocator(), Connector.READ);

This ocuurs with the streaming audio servers (as http://citadelcc.ic.llnwd.net/stream/citadelcc_WPLJ-FM)

 

Developer
Posts: 62
Registered: ‎11-24-2008
My Device: Blackberry 9530

Re: Connection timeout at Connector.open(..)

Are you sure "getLocator()" is returning a valid resource address?


All code is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement.
Developer
Posts: 28
Registered: ‎03-12-2009
My Device: Not Specified

Re: Connection timeout at Connector.open(..)

yes. i`ve traced it in the debug console.
Highlighted
Retired
Posts: 36
Registered: ‎07-14-2008
My Device: Not Specified

Re: Connection timeout at Connector.open(..)

This is probably just a general connectivity issue. Make sure you can connect to the URL using the Network Diagnostic Tool located here:

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/What_Is_-_Network_Diagnostic_Tool.html?...

 

Tariq

Developer
Posts: 28
Registered: ‎03-12-2009
My Device: Not Specified

Re: Connection timeout at Connector.open(..)

The problem is solved now. I tried to connect through mds and got a connection timeout error.

Now  i`m using the direct tcp connection and everything is allright.

Developer
Posts: 71
Registered: ‎11-23-2009
My Device: Not Specified

Re: Connection timeout at Connector.open(..)

How do u make a direct tcp connection. Does BB simulator connects without the mds simulator?

Developer
Posts: 22
Registered: ‎05-04-2009
My Device: Bold 9930
My Carrier: Verizon

Re: Connection timeout at Connector.open(..)

You can view a nice example of different connection string options here:

http://www.localytics.com/blog/post/how-to-reliably-establish-a-network-connection-on-any-blackberry...

 

Adding deviceside=true to the end of the connection string will allow you to establish a direct connection.