MultisensoryManager


public class MultisensoryManager
extends Object

java.lang.Object
   ↳ android.os.multisensory.MultisensoryManager


Provides capabilities to deliver audio-haptic feedback from the Multisensory Design System in Android.

Summary

Constants

int TOKEN_CANCEL

int TOKEN_DRAG_INDICATOR_CONTINUOUS

Inform the user that their drag gesture has resulted in an incremental value change.

int TOKEN_DRAG_INDICATOR_DISCRETE

Inform the user that their drag gesture has resulted in a stepped value change.

int TOKEN_DRAG_INDICATOR_THRESHOLD_LIMIT

int TOKEN_FAILURE

int TOKEN_FAILURE_HIGH_EMPHASIS

int TOKEN_KEYPRESS_DELETE

int TOKEN_KEYPRESS_RETURN

int TOKEN_KEYPRESS_SPACEBAR

int TOKEN_KEYPRESS_STANDARD

int TOKEN_LOCK

int TOKEN_LONG_PRESS

int TOKEN_PAUSE

int TOKEN_START

int TOKEN_STOP

int TOKEN_SUCCESS

int TOKEN_SWIPE_INDICATOR_THRESHOLD_LIMIT

Inform the user that their swipe gesture has crossed a threshold.

int TOKEN_SWITCH_OFF

int TOKEN_SWITCH_ON

int TOKEN_TAP_HIGH_EMPHASIS

int TOKEN_TAP_LOW_EMPHASIS

Played when a user taps on any UI element that can be interacted with but is not otherwise defined.

int TOKEN_TAP_MEDIUM_EMPHASIS

int TOKEN_UNLOCK

Public methods

void playToken(int tokenConstant)

Deliver multisensory feedback associated with the given multisensory token constant.

Inherited methods

Constants

TOKEN_CANCEL

Added in API level 10000
public static final int TOKEN_CANCEL

Constant Value: 6 (0x00000006)

TOKEN_DRAG_INDICATOR_CONTINUOUS

Added in API level 10000
public static final int TOKEN_DRAG_INDICATOR_CONTINUOUS

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 ERROR(MultisensoryContinuousEffectModifier/android.os.multisensory.MultisensoryContinuousEffectModifier MultisensoryContinuousEffectModifier)

Constant Value: 17 (0x00000011)

TOKEN_DRAG_INDICATOR_DISCRETE

Added in API level 10000
public static final int TOKEN_DRAG_INDICATOR_DISCRETE

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 ERROR(MultisensoryContinuousEffectModifier/android.os.multisensory.MultisensoryContinuousEffectModifier MultisensoryContinuousEffectModifier)

Constant Value: 18 (0x00000012)

TOKEN_DRAG_INDICATOR_THRESHOLD_LIMIT

Added in API level 10000
public static final int TOKEN_DRAG_INDICATOR_THRESHOLD_LIMIT

Constant Value: 16 (0x00000010)

TOKEN_FAILURE

Added in API level 10000
public static final int TOKEN_FAILURE

Constant Value: 1 (0x00000001)

TOKEN_FAILURE_HIGH_EMPHASIS

Added in API level 10000
public static final int TOKEN_FAILURE_HIGH_EMPHASIS

Constant Value: 0 (0x00000000)

TOKEN_KEYPRESS_DELETE

Added in API level 10000
public static final int TOKEN_KEYPRESS_DELETE

Constant Value: 22 (0x00000016)

TOKEN_KEYPRESS_RETURN

Added in API level 10000
public static final int TOKEN_KEYPRESS_RETURN

Constant Value: 21 (0x00000015)

TOKEN_KEYPRESS_SPACEBAR

Added in API level 10000
public static final int TOKEN_KEYPRESS_SPACEBAR

Constant Value: 20 (0x00000014)

TOKEN_KEYPRESS_STANDARD

Added in API level 10000
public static final int TOKEN_KEYPRESS_STANDARD

Constant Value: 19 (0x00000013)

TOKEN_LOCK

Added in API level 10000
public static final int TOKEN_LOCK

Constant Value: 10 (0x0000000a)

TOKEN_LONG_PRESS

Added in API level 10000
public static final int TOKEN_LONG_PRESS

Constant Value: 11 (0x0000000b)

TOKEN_PAUSE

Added in API level 10000
public static final int TOKEN_PAUSE

Constant Value: 4 (0x00000004)

TOKEN_START

Added in API level 10000
public static final int TOKEN_START

Constant Value: 3 (0x00000003)

TOKEN_STOP

Added in API level 10000
public static final int TOKEN_STOP

Constant Value: 5 (0x00000005)

TOKEN_SUCCESS

Added in API level 10000
public static final int TOKEN_SUCCESS

Constant Value: 2 (0x00000002)

TOKEN_SWIPE_INDICATOR_THRESHOLD_LIMIT

Added in API level 10000
public static final int TOKEN_SWIPE_INDICATOR_THRESHOLD_LIMIT

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.

Constant Value: 12 (0x0000000c)

TOKEN_SWITCH_OFF

Added in API level 10000
public static final int TOKEN_SWITCH_OFF

Constant Value: 8 (0x00000008)

TOKEN_SWITCH_ON

Added in API level 10000
public static final int TOKEN_SWITCH_ON

Constant Value: 7 (0x00000007)

TOKEN_TAP_HIGH_EMPHASIS

Added in API level 10000
public static final int TOKEN_TAP_HIGH_EMPHASIS

Constant Value: 13 (0x0000000d)

TOKEN_TAP_LOW_EMPHASIS

Added in API level 10000
public static final int TOKEN_TAP_LOW_EMPHASIS

Played when a user taps on any UI element that can be interacted with but is not otherwise defined.

Constant Value: 15 (0x0000000f)

TOKEN_TAP_MEDIUM_EMPHASIS

Added in API level 10000
public static final int TOKEN_TAP_MEDIUM_EMPHASIS

Constant Value: 14 (0x0000000e)

TOKEN_UNLOCK

Added in API level 10000
public static final int TOKEN_UNLOCK

Constant Value: 9 (0x00000009)

Public methods

playToken

Added in API level 10000
public void playToken (int tokenConstant)

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: