Android - 如何获取可用光圈列表

问题描述 投票:0回答:2

Android新手。试图了解如何获得可用光圈列表。下面的代码无法正常工作。有人可以解释我如何从这个属性中提取列表?使用相机2 api。

apertures = CameraCharacteristics.LENS_INFO_AVAILABLE_APERTURES;
android camera
2个回答
2
投票

你必须使用getCameraCharacteristics("camerayouwant").get()来获取角色。

float[] aperatures = CameraManager.getCameraCharacteristics("camerayouwant").get(CameraCharacteristics.LENS_INFO_AVAILABLE_APERTURES);

0
投票

使用aperatures = CameraManager.getCameraCharacteristics("camerayouwant").get(CameraCharacteristics.LENS_INFO_AVAILABLE_APERTURES);

© www.soinside.com 2019 - 2024. All rights reserved.