views:

664

answers:

1

I have an application the requests a media stream from a server, however the request needs to include a cookie or else the server returns a 500 error. MediaPlayer does not have the functionality to send a cookie along with a URI request.

My way around this is to have Android proxy the requests. I'll have the MediaPlayer make a request to the localhost (http://localhost/?ID=1) and then I'll have a small proxy app make the request along with the cookie and return the media stream.

My question is how would I go about making the proxy side? How do I have my app setup a listener on localhost for an http request?

I don't need a full blown code write up on how to do it, just some simple class names and example code showing how to have an android app listen for requests from the mediaplayer.

Thanks in advance!!

A: 

Would I be able to create a custom intent and pass a URI to that intent i.e. (cookieplayer://songid1) and have MediaPlayer play that returned stream?

WedTM
0 vote down Can you do your own media buffer? Using your own HTTP connection to fill a buffer which you pass over to the media player?
haseman
I'm not sure, I'm still looking into this.
WedTM
You cannot currently do your own media buffer.
Isaac Waller