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

Null Streaming Session Returned

This ONLY happens on 7.1.

 

I have about 10 buttons on the screen, each are assigned some audio within it's class.

 

			// load the audio
			InputStream is = getClass().getResourceAsStream(soundresource);
			_snd = Manager.createPlayer(is, "audio/mp3");
			_snd.realize();
			_snd.prefetch();
			is.close();

 Two of the buttons get added, then an exception is thrown:

 

net.rim.device.internal.media.RimMediaException: Null Streaming Session Returned

 

Doesnt' seem to be my day for audio.

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

Re: Null Streaming Session Returned

If you get rid of the InputStream, you get the same effect, but the error is "Media Exception".

 

			// load the audio
			//InputStream is = getClass().getResourceAsStream(soundresource);
			_snd = Manager.createPlayer(soundresource);
			_snd.realize();
			_snd.prefetch();
			//is.close();

 

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: Null Streaming Session Returned

So are you trying to create 10 Media Players at the same time?  Don't think you can do that.  I think you can create either 1 or 2 (2 for CDMA devices).  Does that explain the problem?

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

Re: Null Streaming Session Returned

It doesn't maek sense, because in OS7.0 it works without issue.

 

In OS 7.1, same hardware, it does not work.

 

So yes, I'm triyng to make 10 Players, so I can have everything preloaded, but it does work on every OS except 7.1.

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

Re: Null Streaming Session Returned

[ Edited ]

Well, fixed the issue but cutting it to one Player - still not sure why it works lower then 7.1 though!

 

Thanks!

Contributor
Posts: 18
Registered: ‎01-21-2011
My Device: BB7 - BB10
My Carrier: Developer

Re: Null Streaming Session Returned

[ Edited ]

I do have the same issue. I can create only two Players at hte same time,  a third launches a RimMediaException (with message "Null Streaming Session Returned") on prefetch.

Obviusly all work perfectly on 7.0 and previous  platforms.

 

Unfortunately, I can't avoid to create many Players at the same time.