public final class Hand


Contains the tracking information of one of the user's hands.

Summary

Nested types

public enum Hand.Handedness extends Enum

The handedness of the user's hand.

public final class Hand.State

The representation of the current state of Hand.

Public methods

boolean
equals(Object other)
static final @NonNull Hand.Handedness

Returns the handedness of the user's primary hand.

final @NonNull StateFlow<@NonNull Hand.State>

The current State of this hand.

int
static final Hand
left(@NonNull Session session)

Returns the Hand object that corresponds to the user's left hand when available.

static final Hand
right(@NonNull Session session)

Returns the Hand object that corresponds to the user's right hand when available.

void

Updates the state of the Updatable.

Public methods

equals

public boolean equals(Object other)

getHandedness

Added in 1.0.0-alpha04
public static final @NonNull Hand.Handedness getHandedness(@NonNull ContentResolver resolver)

Returns the handedness of the user's primary hand.

Parameters
@NonNull ContentResolver resolver

the ContentResolver to use to retrieve the setting.

Returns
@NonNull Hand.Handedness

the Handedness of the user's primary hand. If the setting is not configured, returns Handedness.UNKNOWN.

getState

Added in 1.0.0-alpha04
public final @NonNull StateFlow<@NonNull Hand.StategetState()

The current State of this hand.

hashCode

public int hashCode()

left

Added in 1.0.0-alpha04
public static final Hand left(@NonNull Session session)

Returns the Hand object that corresponds to the user's left hand when available.

Parameters
@NonNull Session session

the currently active Session.

Throws
kotlin.IllegalStateException

if HandTrackingMode is set to Disabled.

right

Added in 1.0.0-alpha04
public static final Hand right(@NonNull Session session)

Returns the Hand object that corresponds to the user's right hand when available.

Parameters
@NonNull Session session

the currently active Session.

Throws
kotlin.IllegalStateException

if HandTrackingMode is set to Disabled.

update

Added in 1.0.0-alpha04
public void update()

Updates the state of the Updatable.