如何让相机在 android 工作室中保持打开状态?
How to make the Camera stay opened in android studio?
所以我有一个用户可以打开并用来拍照的相机:
public void launchCamera(View view){
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
//Take picture and pass results along OnActivityResult
startActivityForResult(intent,REQUEST_IMAGE_CAPTURE);
}
但这里的问题是我允许人们拍摄多张照片或单张照片,但是一直强迫用户拍照然后留给 Activity 然后他必须按再次按下相机按钮并拍摄另一张照片,所以我的问题是,是否可以让相机保持打开状态并仍然允许用户拍摄很多照片而不必返回 activity 然后在他完成后单击完成然后回到 activity.
is it possible to keep the Camera opened and still allow the user to get many pictures without having to get back to the activity and then after he finishes he clicks finish and goes back to the activity.
没有使用 ACTION_IMAGE_CAPTURE
,抱歉。您可以使用相关 API 或 third-party 库(例如 Fotoapparat,CameraKit-Android)编写自己的相机代码。
所以我有一个用户可以打开并用来拍照的相机:
public void launchCamera(View view){
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
//Take picture and pass results along OnActivityResult
startActivityForResult(intent,REQUEST_IMAGE_CAPTURE);
}
但这里的问题是我允许人们拍摄多张照片或单张照片,但是一直强迫用户拍照然后留给 Activity 然后他必须按再次按下相机按钮并拍摄另一张照片,所以我的问题是,是否可以让相机保持打开状态并仍然允许用户拍摄很多照片而不必返回 activity 然后在他完成后单击完成然后回到 activity.
is it possible to keep the Camera opened and still allow the user to get many pictures without having to get back to the activity and then after he finishes he clicks finish and goes back to the activity.
没有使用 ACTION_IMAGE_CAPTURE
,抱歉。您可以使用相关 API 或 third-party 库(例如 Fotoapparat,CameraKit-Android)编写自己的相机代码。