Video playback on VideoView disappears after going back from another Activity?

Might be related to the Activity life cycle. Do you start playing your video in the onCreate() method? If so, try to move it to onResume(), which gets called when an activity is sent to the background but then brought back again.OnCreate() only gets called once, when it's first created.

I start player in onTouch event of VideoView. In fact it doesn't stop when another Activity comes to foreground. Although when I go back to Activity with player, video screen goes black.

– pixel Jun 8 '10 at 20:30 Can you add some code? Specifically onCreate() and onTouch() – Ricardo Villamil Jun 9 '10 at 16:28.

Finally I've ended up with MediaPlayer which is destroyed in onStop method and recreated in onResume method. Main drawback of this approach is that after changing orientation MediaPlayer has to buffer video again. I think that the main reason was that reference to MediaPlayer was lost.

Without reference to MediaPlayer I couldn't set SurfaceView again, as a Video display.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions