1

I want my application to Record a video and play on VideView in android. I am doing this for that.

Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
context.startActivityForResult(takeVideoIntent, ACTION_TAKE_VIDEO);

// context is an Activity's context

And overriding onActivityResult() as

Uri mVideoUri = data.getData();
videoView.setVideoUri(mVideoUri);
videoView.setMediaController(new MediaController(this));
videoView.requestFocus();

But Its not playing the recorded video, I also tried by using

videoView.setVideoPath(mVideoUri.getPath());

instead of Uri, but nothing happened except one change that, it show this video cannot be played.

TNR
  • 5,839
  • 3
  • 33
  • 62
Suresh
  • 7,785
  • 1
  • 16
  • 28
  • Post the logcat output. That way people can help you out by nailing the error easily rather than spend most of their time speculating on problems you may be having. – varevarao Jan 02 '13 at 11:44

1 Answers1

0

I fixed this issue, i just made a silly mistake that i didn't invoke videoView.start() Method.

Suresh
  • 7,785
  • 1
  • 16
  • 28