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
Contributor
Posts: 27
Registered: ‎02-12-2010
My Device: Torch 9800

Running a Local/Private HTTP or RTSP Server, Is it Possible?

Is it possible to create a private HTTP/S or RTSP server running in the BlackBerry smartphones and to be accessed by another application in that same device?

 

Personally I don't think it is possible but I just need an assurance from you guys :smileyhappy:

 

Thanks!

Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Running a Local/Private HTTP or RTSP Server, Is it Possible?

If you are intrested in communicating between different applications then you can try and use global events:

http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/system/GlobalEventListener.htm...

 

and:

http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/system/ApplicationManager.html...

 

If you wish to use a browser as the client, then you can try and use the HttpFilterRegistry API:

http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/io/http/HttpFilterRegistry.htm...

 

E.

Contributor
Posts: 27
Registered: ‎02-12-2010
My Device: Torch 9800

Re: Running a Local/Private HTTP or RTSP Server, Is it Possible?

[ Edited ]

Just to give you guys a background on what I'm trying to do.

 

I'm creating an app that plays large video files from memory card. But as I read the data from the video file, I have to process something before I can pass the bytes read to the player. So I cannot create a player using Manager.createPlayer(String locator). And since I have to make the playback seekable, I cannot use Manager.createPlayer(InputStream inputStream, String contentType) as well. So I'm left with only this option Manager.createPlayer(DataSource). Also, I cannot use ByteArrayInputStreamSource since it will require me to finish reading all bytes before I can create a player. So I have to create my own.

 

Anyway, while I can now play video files using my custom DataSource, I'm still not successful on its seek functionality (See another forum post regarding this: How To Implement and Use SourceStream.seek(long).

 

That's why I asked for some alternative solutions and one of the suggestions is to consider creating and running a private HTTP or RTSP server in the background that the player app will be able access to get the video data. This private server will be the one to access the video files and process them before it returns read result to the player.

 

Is it possible to create and run a background HTTP/s or RTSP server that my player app can access and create a Player using Manager.createPlayer(String locator)?

 

Thanks!