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
playToken(tokenConstant: Int)

Deliver multisensory feedback associated with the given multisensory token constant.

Constants

TOKEN_CANCEL

static val TOKEN_CANCEL: Int
Value: 6

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: 17

TOKEN_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: 18

TOKEN_DRAG_INDICATOR_THRESHOLD_LIMIT

static val TOKEN_DRAG_INDICATOR_THRESHOLD_LIMIT: Int
Value: 16

TOKEN_FAILURE

static val TOKEN_FAILURE: Int
Value: 1

TOKEN_FAILURE_HIGH_EMPHASIS

static val TOKEN_FAILURE_HIGH_EMPHASIS: Int
Value: 0

TOKEN_KEYPRESS_DELETE

static val TOKEN_KEYPRESS_DELETE: Int
Value: 22

TOKEN_KEYPRESS_RETURN

static val TOKEN_KEYPRESS_RETURN: Int
Value: 21

TOKEN_KEYPRESS_SPACEBAR

static val TOKEN_KEYPRESS_SPACEBAR: Int
Value: 20

TOKEN_KEYPRESS_STANDARD

static val TOKEN_KEYPRESS_STANDARD: Int
Value: 19

TOKEN_LOCK

static val TOKEN_LOCK: Int
Value: 10

TOKEN_LONG_PRESS

static val TOKEN_LONG_PRESS: Int
Value: 11

TOKEN_PAUSE

static val TOKEN_PAUSE: Int
Value: 4

TOKEN_START

static val TOKEN_START: Int
Value: 3

TOKEN_STOP

static val TOKEN_STOP: Int
Value: 5

TOKEN_SUCCESS

static val TOKEN_SUCCESS: Int
Value: 2

TOKEN_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: 12

TOKEN_SWITCH_OFF

static val TOKEN_SWITCH_OFF: Int
Value: 8

TOKEN_SWITCH_ON

static val TOKEN_SWITCH_ON: Int
Value: 7

TOKEN_TAP_HIGH_EMPHASIS

static val TOKEN_TAP_HIGH_EMPHASIS: Int
Value: 13

TOKEN_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: 15

TOKEN_TAP_MEDIUM_EMPHASIS

static val TOKEN_TAP_MEDIUM_EMPHASIS: Int
Value: 14

TOKEN_UNLOCK

static val TOKEN_UNLOCK: Int
Value: 9

Public 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: