Session.Feature

  • Session.Feature defines fundamental session features for ARCore sessions.

  • All currently defined Session.Feature elements are compatible with each other.

  • The FRONT_CAMERA feature is deprecated and its functionality is now handled by camera configurations.

  • The SHARED_CAMERA feature allows sharing the camera between ARCore and the application, with specific requirements and restrictions when ARCore is active.

public static final enum Session.Feature

Fundamental session features that can be requested using Session.Session(Context, Set).

All currently defined features are mutually compatible.

Inherited Methods

Enum Values

FRONT_CAMERA

public static final Session.Feature FRONT_CAMERA

This field was deprecated.
To create a session using the front-facing (selfie) camera, use Session.setCameraConfig(CameraConfig) with the desired config retrieved from Session.getSupportedCameraConfigs(CameraConfigFilter).

Use the front-facing (selfie) camera. When the front camera is selected, ARCore's behavior changes in the following ways:

SHARED_CAMERA

public static final Session.Feature SHARED_CAMERA

Enable sharing the camera between ARCore and the app. See the class-level documentation for SharedCamera for an example of how to use this method.

Note:

While ARCore is paused you can use the Camera2 APIs directly without restriction.

While ARCore is active, the app may continue to use Camera2 APIs, except it must not call CameraCaptureSession#setRepeatingRequest as this will interfere with ARCore operation.