From 7a5e0b33e41304789d0c1af2e61f262edd7e8bcd Mon Sep 17 00:00:00 2001 From: Mattia Iavarone Date: Fri, 4 Jan 2019 20:03:43 +0100 Subject: [PATCH] Fix demo app --- .../com/otaliastudios/cameraview/demo/CameraActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java b/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java index 7045c042..125e1315 100644 --- a/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java +++ b/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java @@ -20,6 +20,8 @@ import com.otaliastudios.cameraview.PictureResult; import com.otaliastudios.cameraview.Mode; import com.otaliastudios.cameraview.VideoResult; +import java.io.File; + public class CameraActivity extends AppCompatActivity implements View.OnClickListener, ControlView.Callback { @@ -163,7 +165,7 @@ public class CameraActivity extends AppCompatActivity implements View.OnClickLis } if (camera.isTakingPicture() || camera.isTakingVideo()) return; message("Recording for 5 seconds...", true); - camera.takeVideo(null, 5000); + camera.takeVideo(new File(getFilesDir(), "video.mp4"), 5000); } private void captureVideoSnapshot() { @@ -172,7 +174,7 @@ public class CameraActivity extends AppCompatActivity implements View.OnClickLis return; } message("Recording snapshot for 5 seconds...", true); - camera.takeVideoSnapshot(null, 5000); + camera.takeVideoSnapshot(new File(getFilesDir(), "video.mp4"), 5000); } private void toggleCamera() {