How can I limit recording when using intents?
I tried this code:
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra(\"android
private void recordVideo() {
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
fileUri = getOutputMediaFileUri(MEDIA_TYPE_VIDEO);
// set video quality
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 30);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set Video file
startActivityForResult(intent, CAMERA_CAPTURE_VIDEO_REQUEST_CODE);
}
fileuri is your filepath. Try this.