aparnabhure
Lurker
Hello All,
I am trying to play a video (MP4) using VideoView. I need to play video after some screens. I am using only one activity and adding a GLSurfaceView over it. ie my activity's setContentView() is object of GLSurfaceView. After showing some images I need to play video, for that I am adding a VideoView over it using addContentView() method of activity. View gets added properly but it is not visible, I could hear sound of the playback. The warning i could see in logcat is (1,44).
OnCreate(){
mGLSurfaceView = new GLSurfaceView(this);
setContentView(mGLSurfaceView);
}
public void addVideoView(){
Uri uri = Uri.parse(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.movie);
movieView.setVideoURI(uri);
movieView.setMediaController(new MediaController(this));
movieView.setFocusable(true);
movieView.setFocusableInTouchMode(true);
movieView.requestFocus();
addContentView(movieView);
movieView.start();
}
Please let me know how I could solve this problem.
Thank you,
Regards,
Aparna
I am trying to play a video (MP4) using VideoView. I need to play video after some screens. I am using only one activity and adding a GLSurfaceView over it. ie my activity's setContentView() is object of GLSurfaceView. After showing some images I need to play video, for that I am adding a VideoView over it using addContentView() method of activity. View gets added properly but it is not visible, I could hear sound of the playback. The warning i could see in logcat is (1,44).
OnCreate(){
mGLSurfaceView = new GLSurfaceView(this);
setContentView(mGLSurfaceView);
}
public void addVideoView(){
Uri uri = Uri.parse(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.movie);
movieView.setVideoURI(uri);
movieView.setMediaController(new MediaController(this));
movieView.setFocusable(true);
movieView.setFocusableInTouchMode(true);
movieView.requestFocus();
addContentView(movieView);
movieView.start();
}
Please let me know how I could solve this problem.
Thank you,
Regards,
Aparna