public final class Hand implements Trackable


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

Summary

Nested types

public enum Hand.HandSide extends Enum

This enum is deprecated. Use androidx.xr.arcore.HandSide instead.

public final class Hand.State implements Trackable.State

The representation of the current state of a Hand.

Public methods

boolean
equals(Object other)
static final @NonNull HandSide

Returns the handedness of the user's primary hand.

@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.

Extension functions

final @NonNull Flowable<@NonNull Hand.State>

The current State of this hand.

Public methods

equals

public boolean equals(Object other)

getPrimaryHandSide

Added in 1.0.0-alpha13
public static final @NonNull HandSide getPrimaryHandSide(@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 HandSide

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

getState

public @NonNull StateFlow<@NonNull Hand.StategetState()

The current State of this hand.

hashCode

public int hashCode()

left

Added in 1.0.0-alpha13
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

right

Added in 1.0.0-alpha13
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

Extension functions

RxJava3Hand.getStateAsFlowable

public final @NonNull Flowable<@NonNull Hand.StateRxJava3Hand.getStateAsFlowable(@NonNull Hand receiver)

The current State of this hand.