class Hand


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

Summary

Nested types

The handedness of the user's hand.

The representation of the current state of Hand.

Public companion functions

Hand.Handedness

Returns the handedness of the user's primary hand.

Hand?
left(session: Session)

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

Hand?
right(session: Session)

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

Public functions

open operator Boolean
equals(other: Any?)
open Int
open suspend Unit

Updates the state of the Updatable.

Public properties

StateFlow<Hand.State>

The current State of this hand.

Public companion functions

getHandedness

Added in 1.0.0-alpha04
fun getHandedness(resolver: ContentResolver): Hand.Handedness

Returns the handedness of the user's primary hand.

Parameters
resolver: ContentResolver

the ContentResolver to use to retrieve the setting.

Returns
Hand.Handedness

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

left

Added in 1.0.0-alpha04
fun left(session: Session): Hand?

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

Parameters
session: Session

the currently active Session.

Throws
kotlin.IllegalStateException

if HandTrackingMode is set to Disabled.

right

Added in 1.0.0-alpha04
fun right(session: Session): Hand?

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

Parameters
session: Session

the currently active Session.

Throws
kotlin.IllegalStateException

if HandTrackingMode is set to Disabled.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

update

Added in 1.0.0-alpha04
open suspend fun update(): Unit

Updates the state of the Updatable.

Public properties

state

Added in 1.0.0-alpha04
val stateStateFlow<Hand.State>

The current State of this hand.