videoview

Video playback on VideoView disappears after going back from another Activity

I have two Activities: one with VideoView attached to MediaPlayer and the second one. I start watching a video in the first Activity, then during playback I start second Activity. After going back to first Activity I can hear sound but see no picture. My Video Layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=...

Android VideoView LinearLayout.LayoutParams

I am playing a video using VideoView in my app. When I play it on Droid with linearlayout params FILL_PARENT, FILL_PARENT, it plays well. The same params do not work well for a myTouch. What params can I use that will work well with most devices? Thanks Chris ...

VideoView problem in 2.1 Emulator of Android?

Hi, I am using the code available here VideoView Example. This code runs properly on Android emulator 1.6 but not on 2.1. In 2.1 it only plays the audio and not video. I have gone through several other threads where this issue has been mentioned. I will like to know whether this problem is limited to emulator only or the devices also ...

Can a videoview play a video stored on internal storage?

I'm trying to provide my users with the ability to use either external or internal storage. I'm displaying both images and videos (of a scientific nature). When storing the media on the SD card, all is fine. But when I store the media internally, only the images will display. No matter what I try I get various errors when trying to load ...

Android VideoView LinearLayout LayoutParams

My app plays a video using VideoView. I am using a LinearLayout to add some text, the video and then some buttons. My question is what kind of layout params can I use for the VideoView to make sure it plays well in all phones? Basically, when in portrait mode, I want the complete width to be used, and video height to be used. When in l...

Android -- RelativeLayout and LinearLayout -- VideoView resize issue

I am having a video resizing issue, I have to build the layout programatically, and here's my code: layout = new RelativeLayout(this); top = new RelativeLayout.LayoutParams( LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT); top.addRule(RelativeLayout.ALIGN_PARENT_TOP); RelativeLayout.LayoutParams middle = new Relativ...

playing videos in android

how do i play videos in android application?? the videos will be placed in res/raw folder?? ...

Android - TextView and VideoView problem

I have a TextView inside a LinearLayout and a VideoView inside a LinearLayout. The parent layout is a RelativeLayout that includes the TextView's linear layout and VideoView's linear layout. Since I add the VideoView with FILL_PARENT, FILL_PARENT params (coz I want it to fill the screen in landscape mode), in some phones when I rotat...

Only loading video into VideoView without instantly playing

Hi there, I got a question is it possible in Android to load the video data into a VideoView without it instantly starting to play?? If so, how could I do that? Thank you. ...

Android VideoView scaling

I have a VideoView inside a LinearLayout. I want the video to scale so that in portrait, it shows up as the original width and height of the video, but in landscape, it should fill the screen as much as possible, leaving space on top for any other view above the Linear Layout. What parameters can I use? Thanks Chris ...

Android - VideoView video scaling - different screen orientations and devices

How does Android handle scaling of a video being played within a VideoView? So for example if I have a video that is say 480 X 270 (width and height), aspect ratio 16:9. And, say the VideoView is added to a LinearLayout with LayoutParams of (480, 270). What will be width and height of the rendered video in portrait orientation in a devi...

Android VideoView Landscape Orientation Problem

I am pretty new to Android and mobile development in general. I am creating an Android application that plays a video using VideoView after a button is selected. The problem is when you rotate the phone the video restarts. I know its because the activity is destroyed and recreated when it is rotated. So I just locked the video player in ...

android videoview - managing bad urls error ?

Hello, Im using some time expiring url to watch a video from internet and so, when the expiration time come out, the video is not working anymore. In this case, im getting an error dialog box from the videoplayer saying the video is unreadable. that is quite fine, but i would like to display my own dialog box text. how can i do ? is the...

VideoView in ViewFlipper is transparent when video is playing

I've got an Activity with two views set up in a ViewFlipper. One of the views is a layout with a GLSurfaceView and a few other widgets, the other just has a layout with a TextView and a VideoView. When I click on something in the GLSurfaceView, the ViewFlipper swaps so the video can play. In this screenshot, you can see the plain GLSurfa...

VideoView plays ok, but not visible when swapping fullscreen views

I have some AsyncTask that loads a video stream into the player, so I want to show some Loading screen while it performs. Currently my onCreate code looks like this: final View loadingView = getLayoutInflater().inflate(R.layout.video_loading, null); final View playerView = getLayoutInflater().inflate(R.layout.player, null); final VideoV...

Is it possible to place one view over another in android?

Hi, Can we place a small view over another large view? For example, i have a VideoView which is playing a file in the background. Over this, somewhere in the middle/corner, I want to place another ImageView. But in Linear/Relative Layout, views can be placed only one after another or relativ to each other. And Absolutelayout is advise...

VideoView and step play (frame by frame)

I would like to play frame by frame with the videoview. I have this: mVideoView.seekTo(mVideoView.getCurrentPosition()+1); But after this I do not see the frame until I click play... I do not want that, I just want to see the next frame. Also - can I do the same for previous frame? Thanks in advance. ...

VideoView inside a Widget - getting android.view.InflateException: Binary XML

This should have been the simplest thing, but I can't get it to run. The following XML layout will cause Error inflating AppWidget AppWidgetProviderInfo exception: > <?xml version="1.0" encoding="utf-8"?> <LinearLayout > xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_width="wrap_content" > android:orie...

VideoView invisible in Popupwindow?

My target: I am trying to play a video when tapping on one of the item on the screen while still staying on that screen. So I resort to PopupWindow but somehow VideoView doesn't show up in the popup. I can display popup just fine but the VideoView doesn't(in fact, it's not invisible but rather freeze that section of the screen). If you...

Android Video Streaming Problem

Hi all, I am new to android and trying to streaming video from my server. When i run the application it gives Error "sorry,this video is not valid for streaming to this Device.." than i download and push to sdcard of my device(samsung Galaxy 5)this time video is playing.... i convert this video by SOTHINK VIDEO CONVERTER.. Any Help?? Th...