I am trying to use android.widget.VideoView to stream content. I need to ensure that when using setVideoURI(Uri) that VideoView will include Cookies from prior HttpClient calls. I see in the source that there is setVideoUri(Uri,Headers) but this has a @hide JavaDoc annotation and won't compile.
So, anyway to pass cookies or headers with the HTTP requests made by VideoView?
Thanks.
I had the same issue. You can manually set the header object, or any other private feild for that matter, using a class called Field (click for API DOC).
I've tested this and it works.
This code is VideoView work process Open file explore,go to a mnt and sdcard after that ckick the button (push a file onto device) store the data.clock on run button
This code is a main.xml file
This code is video.java file
This is manifest file permission code
Extract classes VideoView and Metadata from SDK. Then, you will be able to call
setVideoURI(Uri uri, Map<String, String> headers)
on your own VideoView class.Note that metadata are not extracted because
mp.getMetadata(MediaPlayer.METADATA_ALL, MediaPlayer.BYPASS_METADATA_FILTER)
is not accessible but you can try withMediaMetadataRetriever
VideoView