Vinod
Vinod

Reputation: 32861

How to store Video in Android?

I use the below intent to call the camera application to capture video. This is working fine. But On the onActivityResult I am not sure how to store this into a file in SD card. Can some one give me a sample to do this. Thank you.

Intent cameraIntent = new Intent(
                android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
        startActivityForResult(cameraIntent, CAMERA_VIDEO_REQUEST);
  1. Also I want to show a preview of the video in my application and then if the user clicks the preview i need to open it up in a video player. Can I get some help on that as well. Thank you.

Upvotes: 0

Views: 1554

Answers (1)

Deva
Deva

Reputation: 3949

You can use the MediaRecorder class to capture video and store it somewhere in the sdcard.

Pls have a look at the link below which might help you

How can I capture a video recording on Android?

Thanks!

Upvotes: 1

Related Questions