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
Trusted Contributor
hims_3009
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000
Accepted Solution

Streaming throws Interrupted IO Exception

I am using the Streaming code given at following link

http://supportforums.blackberry.com/t5/Java-Development/Streaming-media-Start-to-finish/ta-p/488255

But When I am going to stop the Thread It shows UncaughtException thrown--------- InterruptedException..ConnectionClosed exception.How to handle it?

 

Lathiya Himanshu
Please use plain text.
Trusted Contributor
hims_3009
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000

Re: Streaming throws Interrupted IO Exception

Not a single answer?

Lathiya Himanshu
Please use plain text.
BlackBerry Development Advisor
MSohm
Posts: 14,689
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: Streaming throws Interrupted IO Exception

You can catch the exception and reopen the stream.

 

There are a few things that can cause this.

 

1.  Server closes the connection.

2.  Device goes out of coverage.

3.  Maximum amount of data per connection has been reached (applies to connections through a BlackBerry Enterprise Server, BlackBerry Internet Service and WAP Gateways).

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
neeraj_chauhan
Posts: 86
Registered: ‎10-28-2010
My Device: Blackberry Curve, Bold and Strom

Re: Streaming throws Interrupted IO Exception

Try with this code here no need to run thread.

 

            BrowserSession browserSession = Browser.getDefaultSession();
            browserSession.displayPage(streamVideoURL);

 

 

I am using this code in Blackberry 5.0 and its working properly.

 So try it

 

 

Thanks

Thanks & Regards
Neeraj Chauhan
Please use plain text.
Trusted Contributor
hims_3009
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000

Re: Streaming throws Interrupted IO Exception

[ Edited ]

@  neeraj_chauhan


I already tried that code but it always shows the Connection timed out exception for some links and

for below link its giving error "An error has occured in playing media".


http://live.cumulusstreaming.com/KPLX-FM

Lathiya Himanshu
Please use plain text.
Trusted Contributor
hims_3009
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000

Re: Streaming throws Interrupted IO Exception

@MSoham

 

I am trying to stream the following file from the server but I am getting the IllegalArgument Exception..

http://live.cumulusstreaming.com/KPLX-FM

Its correctly playing with the WindowsMedia Player on window but can't play in Blackberry.

 

Regards,

Lathiya Himanshu
Please use plain text.
BlackBerry Development Advisor
MSohm
Posts: 14,689
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: Streaming throws Interrupted IO Exception

What format is the media?  You can read a list of supported formats here:

 

http://docs.blackberry.com/en/smartphone_users/deliverables/18349/711-01774-123_Supported_Media_Type...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Trusted Contributor
hims_3009
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000

Re: Streaming throws Interrupted IO Exception

[ Edited ]

It is video/x-ms-asf format..

Note that Its actually mms link but we have implemented the MMS protocol through Socket connection but getting this error.

Lathiya Himanshu
Please use plain text.
Trusted Contributor
hims_3009
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000

Re: Streaming throws Interrupted IO Exception

I checked the application on the device and works fine. Don't know what problem on simulator.

But its working fine on device.

 

Lathiya Himanshu
Please use plain text.