When used as a camera filter, viaCameraConfigFilter.setDepthSensorUsage(EnumSet),
indicates that ARCore will not attempt to use a depth sensor, even if it is present. Most
commonly used to filter camera configurations when the app requires exclusive access to the
depth sensor outside of ARCore, for example to support 3D mesh reconstruction. Available on
all ARCore supported devices.
When used as a camera filter, viaCameraConfigFilter.setDepthSensorUsage(EnumSet),
indicates that a depth sensor must be present on the device, and the depth sensor will be
used by ARCore. Not supported on all devices.
Currently not supported whenSharedCameraAPI is used to share
control of the camera with ARCore.
[[["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\u003eCameraConfig.DepthSensorUsage\u003c/code\u003e is an enum defining how the depth sensor is utilized by ARCore.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDO_NOT_USE\u003c/code\u003e signifies that ARCore won't use the depth sensor, even if available, allowing exclusive access by other applications.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eREQUIRE_AND_USE\u003c/code\u003e mandates the presence and use of a depth sensor by ARCore for its functionalities, though with device limitations and SharedCamera incompatibility.\u003c/p\u003e\n"]]],[],null,["# CameraConfig.DepthSensorUsage\n\n`\npublic static final enum\n`**CameraConfig.DepthSensorUsage**`\n` \nDepth sensor usage. \n\nInherited Methods\n-----------------\n\nFrom `class\njava.lang.Enum` \n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` final `[Object](https://developer.android.com/reference/java/lang/Object)` ` | clone`()` |\n| ` final int ` | compareTo`(`[CameraConfig.DepthSensorUsage](/ar/reference/java/com/google/ar/core/CameraConfig.DepthSensorUsage)` arg0)` |\n| ` int ` | compareTo`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` final Optional\u003cEnumDesc\u003c`[CameraConfig.DepthSensorUsage](/ar/reference/java/com/google/ar/core/CameraConfig.DepthSensorUsage)`\u003e\u003e ` | describeConstable`()` |\n| ` final boolean ` | equals`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` final void ` | finalize`()` |\n| ` final `[Class](https://developer.android.com/reference/java/lang/Class)`\u003c`[CameraConfig.DepthSensorUsage](/ar/reference/java/com/google/ar/core/CameraConfig.DepthSensorUsage)`\u003e ` | getDeclaringClass`()` |\n| ` final int ` | hashCode`()` |\n| ` final `[String](https://developer.android.com/reference/java/lang/String)` ` | name`()` |\n| ` final int ` | ordinal`()` |\n| ` `[String](https://developer.android.com/reference/java/lang/String)` ` | toString`()` |\n| ` static \u003cT extends `[Enum](https://developer.android.com/reference/java/lang/Enum)`\u003cT\u003e\u003e T ` | valueOf`(`[Class](https://developer.android.com/reference/java/lang/Class)`\u003cT\u003e arg0, `[String](https://developer.android.com/reference/java/lang/String)` arg1)` |\n\nFrom `class\njava.lang.Object` \n\n|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| ` `[Object](https://developer.android.com/reference/java/lang/Object)` ` | clone`()` |\n| ` boolean ` | equals`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` void ` | finalize`()` |\n| ` final `[Class](https://developer.android.com/reference/java/lang/Class)`\u003c?\u003e ` | getClass`()` |\n| ` int ` | hashCode`()` |\n| ` final void ` | notify`()` |\n| ` final void ` | notifyAll`()` |\n| ` `[String](https://developer.android.com/reference/java/lang/String)` ` | toString`()` |\n| ` final void ` | wait`(long arg0, int arg1)` |\n| ` final void ` | wait`(long arg0)` |\n| ` final void ` | wait`()` |\n\nFrom `interface\njava.lang.constant.Constable` \n\n|-----------------------------------------------|-----------------------|\n| ` abstract Optional\u003c? extends ConstantDesc\u003e ` | describeConstable`()` |\n\nFrom `interface\njava.lang.Comparable` \n\n|------------------|--------------------------------------------------------------------------------------------------------------------------|\n| ` abstract int ` | compareTo`(`[CameraConfig.DepthSensorUsage](/ar/reference/java/com/google/ar/core/CameraConfig.DepthSensorUsage)` arg0)` |\n\nEnum Values\n-----------\n\n#### public\nstatic\nfinal\nCameraConfig.DepthSensorUsage\nDO_NOT_USE\n\n### DO_NOT_USE\n\n```java\npublic static final CameraConfig.DepthSensorUsage DO_NOT_USE\n``` \nWhen used as a camera filter, via [CameraConfigFilter.setDepthSensorUsage(EnumSet)](/ar/reference/java/com/google/ar/core/CameraConfigFilter#setDepthSensorUsage(java.util.EnumSet\u003ccom.google.ar.core.CameraConfig.DepthSensorUsage\u003e)),\nindicates that ARCore will not attempt to use a depth sensor, even if it is present. Most\ncommonly used to filter camera configurations when the app requires exclusive access to the\ndepth sensor outside of ARCore, for example to support 3D mesh reconstruction. Available on\nall ARCore supported devices.\n\nWhen returned by [CameraConfig.getDepthSensorUsage()](/ar/reference/java/com/google/ar/core/CameraConfig#getDepthSensorUsage()), indicates that the camera config will not\nuse a depth sensor.\n\n#### public\nstatic\nfinal\nCameraConfig.DepthSensorUsage\nREQUIRE_AND_USE\n\n### REQUIRE_AND_USE\n\n```java\npublic static final CameraConfig.DepthSensorUsage REQUIRE_AND_USE\n``` \nWhen used as a camera filter, via [CameraConfigFilter.setDepthSensorUsage(EnumSet)](/ar/reference/java/com/google/ar/core/CameraConfigFilter#setDepthSensorUsage(java.util.EnumSet\u003ccom.google.ar.core.CameraConfig.DepthSensorUsage\u003e)),\nindicates that a depth sensor must be present on the device, and the depth sensor will be\nused by ARCore. Not supported on all devices.\n\nCurrently not supported when [SharedCamera](/ar/reference/java/com/google/ar/core/SharedCamera) API is used to share\ncontrol of the camera with ARCore.\n\nWhen returned by [CameraConfig.getDepthSensorUsage()](/ar/reference/java/com/google/ar/core/CameraConfig#getDepthSensorUsage()), indicates that the camera config will use\na depth sensor."]]