CameraSourceConfig
Stay organized with collections
Save and categorize content based on your preferences.
Config class to hold different camera source settings.
Nested Class Summary
class
Builder for CameraSourceConfig.
@interface
Direction of the camera facing relative to
device screen.
Inherited Method Summary
From class java.lang.Object
Constants
public static final int
CAMERA_FACING_BACK
public static final int
CAMERA_FACING_FRONT
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eCameraSourceConfig\u003c/code\u003e is a class for configuring camera source settings in an Android application.\u003c/p\u003e\n"],["\u003cp\u003eIt allows developers to specify the camera facing direction (front or back) using constants like \u003ccode\u003eCAMERA_FACING_FRONT\u003c/code\u003e and \u003ccode\u003eCAMERA_FACING_BACK\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eBuilder\u003c/code\u003e class is provided to facilitate the creation and configuration of \u003ccode\u003eCameraSourceConfig\u003c/code\u003e instances.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCameraFacing\u003c/code\u003e annotation is used to indicate the direction of the camera relative to the device screen.\u003c/p\u003e\n"]]],["`CameraSourceConfig` manages camera settings, using a `Builder` for configuration. It defines camera direction using `CameraFacing` interface. Key actions involve setting the camera to face `CAMERA_FACING_BACK` (1) or `CAMERA_FACING_FRONT` (0). It contains inherited methods from the Object class like clone(), equals(), finalize(), getClass(), hashCode(), notify(), notifyAll(), toString(), and wait(). The class provides the settings and the build method for the camera.\n"],null,["# CameraSourceConfig\n\npublic class **CameraSourceConfig** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nConfig class to hold different camera source settings. \n\n### Nested Class Summary\n\n|------------|---|---|-----------------------------------------------------------|\n| class | [CameraSourceConfig.Builder](/android/reference/com/google/mlkit/vision/camera/CameraSourceConfig.Builder) || Builder for CameraSourceConfig. |\n| @interface | [CameraSourceConfig.CameraFacing](/android/reference/com/google/mlkit/vision/camera/CameraSourceConfig.CameraFacing) || Direction of the camera facing relative to device screen. |\n\n### Constant Summary\n\n|-----|-----------------------------------------------------------------------------------------------------------------|---|\n| int | [CAMERA_FACING_BACK](/android/reference/com/google/mlkit/vision/camera/CameraSourceConfig#CAMERA_FACING_BACK) | |\n| int | [CAMERA_FACING_FRONT](/android/reference/com/google/mlkit/vision/camera/CameraSourceConfig#CAMERA_FACING_FRONT) | |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final int\n**CAMERA_FACING_BACK**\n\nConstant Value: 1 \n\n#### public static final int\n**CAMERA_FACING_FRONT**\n\nConstant Value: 0"]]