The HTTP session isn't controlled by the Java application, the media
framework has its own HTTP client.

The Java proxy object for the network session is the MediaPlayer
object which is owned by VideoView. You could retain a reference to
the VideoView object across the orientation change, so that it keeps
its internal MediaPlayer reference. You need to be careful because
holding on to a MediaPlayer object can have significant implications
on battery life, so you want to make sure you release it if your
activity no longer has the focus.

Unfortunately, the current VideoView design doesn't work well for
restoring state because it starts playing immediately after setVideoURI
().

On Dec 7, 12:59 am, ben rosenberg <[EMAIL PROTECTED]> wrote:
> hey folks,
>
> to make a long story short, I'm working on an app that plays streaming
> video content in a VideoView with a MediaController; Im wondering how
> I can preserve the state of my VideoView across orientation changes,
> such that opening the keyboard doesn't restart the playback, etc..
>
> I've been messing around with onSaveInstanceState, but Im fairly
> certain I'm missing something (possibly Parcelized objects?) ..
> Ideally i think I'd like to save and restore the state of the
> MediaPlayer,  as well as an HttpClient (or at least its cookiejar) ...
> I suspect this will have to be done with Parcelables, but I don't
> quite have my head around how those work (and the Notepad example
> hasn't helped)..
>
> any suggestions, or especially code or pseudocode examples, would be
> greatly apprectiated
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to