首页 > 解决方案 > 如何为相机添加白平衡

问题描述

我正在 Note 9 上开发我的应用程序。如果我打开普通相机,我可以看到白平衡、对比度、亮度等功能和全景拍摄。

但是如果我打开我开发的应用程序,我看不到这些功能。只有手电筒,相机,视频。

那么,如果用户的手机有,我该如何在我的应用程序中添加这些功能呢?

/**
     * Capturing Camera Image will launch camera app requested image capture
     */
 private void captureImage() {
       Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

        File file = CameraUtils.getOutputMediaFile(MEDIA_TYPE_IMAGE);
        if (file != null) {
            imageStoragePath = file.getAbsolutePath();
        }

        Uri fileUri = CameraUtils.getOutputMediaFileUri(getApplicationContext(), file);

        intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);

        // start the image capture Intent
        startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);
  }

我的manifest

<uses-feature
    android:name="android.hardware.camera"
    android:required="false" />

标签: android

解决方案


“普通相机”实际上是一个应用程序,它们实现了几个功能,这就是为什么手机之间的功能可能会有很大差异。

如果您想在相机上使用这些功能,则需要实现它们。也许这可以帮助:


推荐阅读