DeviceTrackingMode


public final class DeviceTrackingMode


Feature that allows tracking of the AR device.

Summary

Public fields

static final @NonNull DeviceTrackingMode

The device pose will not be tracked.

static final @NonNull DeviceTrackingMode

Tracks device pose with 3DoF (rotation only) and provides the last known pose from the system.

static final @NonNull DeviceTrackingMode

Tracks device pose and provides the last known 6DoF (rotation and translation) pose from the system.

Public methods

final int
@NonNull String

Returns a string representation of DeviceTrackingMode for debugging.

Public fields

DISABLED

public static final @NonNull DeviceTrackingMode DISABLED

The device pose will not be tracked. In this mode, androidx.xr.arcore.RenderViewpoint will not emit updates to androidx.xr.arcore.RenderViewpoint.State.pose.

INERTIAL

@ExperimentalInertialTrackingApi
public static final @NonNull DeviceTrackingMode INERTIAL

Tracks device pose with 3DoF (rotation only) and provides the last known pose from the system. Note that there is generally a delay between the actual device pose and the pose provided by the system by the time of the update.

Supported runtimes:

  • Projected

SPATIAL

public static final @NonNull DeviceTrackingMode SPATIAL

Tracks device pose and provides the last known 6DoF (rotation and translation) pose from the system. Note that there is generally a delay between the actual device pose and the pose provided by the system by the time of the update.

Supported runtimes:

  • OpenXR

  • Play Services

Required permissions:

  • CAMERA (Play Services runtimes only)

Public methods

getMode

Added in 1.0.0-beta02
public final int getMode()

toString

public @NonNull String toString()

Returns a string representation of DeviceTrackingMode for debugging.

Note: Not intended for production use.