Sounds

Added in API level XE12

Extra constants for Glass-specific sounds effects.

This set extends the existing AudioManager constants with Glass-specific sounds.

General usage

To play a sound, call playSoundEffect(int) with the desired sound. For example, to play the TAP sound:

 AudioManager audio = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
 audio.playSoundEffect(Sounds.TAP);
 

Constants
int DISALLOWED User tried a disallowed action.
int DISMISSED User dismissed an item.
int ERROR An error occurred.
int SELECTED An item became selected.
int SUCCESS An action completed successfully.
int TAP User tapped on item.
Inherited Methods

Constants

Added in API level XE12

public static final int DISALLOWED

User tried a disallowed action.

Constant Value: 10
Added in API level XE12

public static final int DISMISSED

User dismissed an item.

Constant Value: 15
Added in API level XE12

public static final int ERROR

An error occurred.

Constant Value: 11
Added in API level XE12

public static final int SELECTED

An item became selected.

Constant Value: 14
Added in API level XE12

public static final int SUCCESS

An action completed successfully.

Constant Value: 12
Added in API level XE12

public static final int TAP

User tapped on item.

Constant Value: 13