在Android Studio中调用相机可以通过使用系统的相机应用来实现。

您可以通过使用Intent来启动系统相机应用,并在相机拍摄照片后获取照片的Uri。代码如下所示:

private void openCamera() {
    Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    // Ensure that there's a camera activity to handle the intent
    if (takePictureIntent.resolve