MultisensoryManager
open class MultisensoryManager
| kotlin.Any | |
| ↳ | android.os.multisensory.MultisensoryManager |
Provides capabilities to deliver audio-haptic feedback from the Multisensory Design System in Android.
Summary
| Constants | |
|---|---|
| static Int | |
| static Int |
Inform the user that their drag gesture has resulted in an incremental value change. |
| static Int |
Inform the user that their drag gesture has resulted in a stepped value change. |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int |
Inform the user that their swipe gesture has crossed a threshold. |
| static Int | |
| static Int | |
| static Int | |
| static Int |
Played when a user taps on any UI element that can be interacted with but is not otherwise defined. |
| static Int | |
| static Int | |
| Public methods | |
|---|---|
| open Unit |
Deliver multisensory feedback associated with the given multisensory token constant. |
Constants
TOKEN_DRAG_INDICATOR_CONTINUOUS
static val TOKEN_DRAG_INDICATOR_CONTINUOUS: Int
Inform the user that their drag gesture has resulted in an incremental value change.
This token can be used to create a continuous effect affected by MultisensoryContinuousEffectModifier
Value: 17TOKEN_DRAG_INDICATOR_DISCRETE
static val TOKEN_DRAG_INDICATOR_DISCRETE: Int
Inform the user that their drag gesture has resulted in a stepped value change.
This token can be used to create a continuous effect affected by MultisensoryContinuousEffectModifier
Value: 18TOKEN_DRAG_INDICATOR_THRESHOLD_LIMIT
static val TOKEN_DRAG_INDICATOR_THRESHOLD_LIMIT: Int
Value: 16TOKEN_FAILURE_HIGH_EMPHASIS
static val TOKEN_FAILURE_HIGH_EMPHASIS: Int
Value: 0TOKEN_SWIPE_INDICATOR_THRESHOLD_LIMIT
static val TOKEN_SWIPE_INDICATOR_THRESHOLD_LIMIT: Int
Inform the user that their swipe gesture has crossed a threshold. This indicates that the swipe action beyond the threshold will activate when the swipe is completed.
Value: 12TOKEN_TAP_LOW_EMPHASIS
static val TOKEN_TAP_LOW_EMPHASIS: Int
Played when a user taps on any UI element that can be interacted with but is not otherwise defined.
Value: 15TOKEN_TAP_MEDIUM_EMPHASIS
static val TOKEN_TAP_MEDIUM_EMPHASIS: Int
Value: 14Public methods
playToken
open fun playToken(tokenConstant: Int): Unit
Deliver multisensory feedback associated with the given multisensory token constant.
If the token defines audio-haptic feedback, audio and haptics will be played with the best synchronization possible. If the token only corresponds to haptics, only haptics will play.
| Parameters | |
|---|---|
tokenConstant |
Int: The token constant to play. Must be one of the constants defined by the MultisensoryManager. Value is one of the following:
|