Class CameraFeatures
-
- All Implemented Interfaces:
public abstract class CameraFeaturesA class to hold information about the supported features of a camera. (In a camera API version independent way)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumCameraFeatures.FocusModeHelper enum for the focus mode to abstract away the differences in camera API 1 and 2
public enumCameraFeatures.SceneModeHelper enum for the scene mode to abstract away the differences in camera API 1 and 2
public enumCameraFeatures.OutputFormatHelper enum to be able to get a string representation of the output format.
public enumCameraFeatures.LensFacingHelper enum for the lens facing direction to abstract away the differences in camera API 1 and 2
public classCameraFeatures.FpsRangeHelper class for the FPS ranges to abstract away the differences in camera API 1 and 2
-
Constructor Summary
Constructors Constructor Description CameraFeatures()
-
Method Summary
Modifier and Type Method Description CameraFeatures.LensFacinggetLensFacing()intgetSensorOrientation()Clockwise angle through which the output image needs to be rotated to be upright on the device screen in its native orientation. List<CameraFeatures.FocusMode>getFocusModes()List<CameraFeatures.SceneMode>getSceneModes()List<CameraSize>getPreviewSizes()List<CameraSize>getPictureSizes()List<CameraSize>getVideoSizes()booleanisFlashSupported()intgetMaxFocusRegions()intgetMaxAutoExposureRegions()booleanisVideoStabilizationSupported()Array<CameraFeatures.FpsRange>getFpsRanges()CameraFeatures.FpsRangegetMaxFpsRange()intgetMinExposure()intgetMaxExposure()floatgetExposureStep()StringtoString()-
-
Method Detail
-
getLensFacing
CameraFeatures.LensFacing getLensFacing()
- Returns:
the direction the camera is facing (back, front or external)
-
getSensorOrientation
int getSensorOrientation()
Clockwise angle through which the output image needs to be rotated to be upright on the device screen in its native orientation.
Range of valid values: 0, 90, 180, 270
-
getFocusModes
@NonNull() List<CameraFeatures.FocusMode> getFocusModes()
- Returns:
the available focus modes
-
getSceneModes
@Nullable() List<CameraFeatures.SceneMode> getSceneModes()
- Returns:
the available scene modes
-
getPreviewSizes
@NonNull() List<CameraSize> getPreviewSizes()
- Returns:
the available preview sizes
-
getPictureSizes
@NonNull() List<CameraSize> getPictureSizes()
- Returns:
the available picture sizes
-
getVideoSizes
@Nullable() List<CameraSize> getVideoSizes()
- Returns:
the available video sizes
-
isFlashSupported
boolean isFlashSupported()
- Returns:
true if torch flash is supported
-
getMaxFocusRegions
int getMaxFocusRegions()
- Returns:
the maximum number of focus regions that can be set
-
getMaxAutoExposureRegions
int getMaxAutoExposureRegions()
- Returns:
the maximum number of auto exposure regions that can be set
-
isVideoStabilizationSupported
boolean isVideoStabilizationSupported()
- Returns:
true if video stabilization is supported (software)
-
getFpsRanges
@NonNull() Array<CameraFeatures.FpsRange> getFpsRanges()
- Returns:
the available FPS ranges
-
getMaxFpsRange
@NonNull() CameraFeatures.FpsRange getMaxFpsRange()
- Returns:
the highest available fps range
-
getMinExposure
int getMinExposure()
- Returns:
minimum exposure compensation value in count of getExposureStep
-
getMaxExposure
int getMaxExposure()
- Returns:
maximum exposure compensation value in count of getExposureStep
-
getExposureStep
float getExposureStep()
- Returns:
Smallest step by which the exposure compensation can be changed
-
-
-
-