Writing a fully-compliant rewriting http proxy is non-trivial, but still do-able. You could have a look here<http://android.git.kernel.org/?p=platform/external/qemu.git;a=blob;f=proxy/proxy_http_rewriter.c;h=afd929c0a48e7a635a8a8423a1f1566f34b628ec;hb=master>to see how the one in the emulator is implemented, but there are probably easier ways to do that if you use a dedicated thread instead.
However, I'm a bit doubtful about using such a solution to solve your original problem. Do you have more details about it ? On Sat, Mar 27, 2010 at 5:39 PM, Scott <sjholli...@gmail.com> wrote: > Looking for help with creating an http proxy server via Android. It's > a bit difficult to ask this question with examples, etc, because > networking isn't familiar to me, which means I don't quite know how to > get started, so I'll try to explain: I'm attempting to play an audio > stream using Android's MediaPlayer. It's a snap using setDataSource > and my URL string... only some phones (those still running Android > 1.5) won't play the stream. Through research I've discovered that the > problem may reside with the headers associated with my stream URL, > that something in them is either missing, wrong, or simply needs to be > changed in order for the MediaPlayer not to reject the URL on > prepare() (could be length and/or content-type). I've been told that I > should attempt to solve the problem by creating an http proxy server > in my app, one where I can alter the headers to however I need them, > and then attach to the stream through this new proxy... but I haven't > the slightest idea on how to do this. Anyone have advice? I'd greatly > appreciate a point in the right direction through code, not just > suggestions like "look up HttpClient in the SDK", because I've been > through all of that and am getting nowhere. Thanks... > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > > To unsubscribe from this group, send email to android-developers+ > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > ME" as the subject. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.