在 Android 中不关闭相机拍摄图像

Take images without closing camera in Android

我想为我的应用程序开发相机功能,我必须在其中拍摄 10 张图像。相机不应该关闭,而是应该在我按住快门按钮时连续拍照。我正在使用打开相机的意图,但在拍摄一张照片后相机停止了。我怎样才能实现所需的功能?

您需要使用 android.hardware.Camera and/or 和 android.hardware.camera2.* 类 编写自己的相机代码。没有 Intent 相机应用程序开发人员需要支持的结构来处理您的用例。