5

I have an intent that calls the video capture activity:

Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
            intent.putExtra(MediaStore.EXTRA_OUTPUT,  Uri.fromFile(videoFile));
            intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
            startActivityForResult(intent,CAPTURE_VIDEO_ACTIVITY_REQUEST_CODE);

It works fine on my SE X8, but on Galaxy Tab the video capture activity never quits. After I stop recording, there is no button to quit the video capture. Is there any extra parameter I need to set?

ezequielc
  • 235
  • 2
  • 7

3 Answers3

2

Just remove this line:

intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(videoFile));

After that everything worked as expected for me on Galaxy Tab.

ararog
  • 1,092
  • 10
  • 18
1

Removing

intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(videoFile));

works, but then you will have to capture the uri with

public void onActivityResult(int requestCode, int resultCode, Intent intent) {
    super.onActivityResult(requestCode, resultCode, intent);

    if ((requestCode == VIDEO_REQUEST_CODE) && (resultCode == RESULT_OK)) {

        // The URI string is in intent.getData());
    }
}

and move the video to another location if is the functionality you need.

The crazy thing is that MediaStore.EXTRA_OUTPUT works perfectly with ACTION_IMAGE_CAPTURE.

daemmie
  • 6,361
  • 3
  • 29
  • 45
ElYeante
  • 1,745
  • 21
  • 22
0

You can prepare your own SurfaceHolder class for this. Just try this link It's wokring perfectly.

Praveenkumar
  • 24,084
  • 23
  • 95
  • 173