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
From class java.lang.Object
Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait()
final void wait(long arg0, int arg1)
final void wait(long arg0)

Constants

Added in API level XE12

public static final int DISALLOWED 

User tried a disallowed action.

See Also

Constant Value: 10

Added in API level XE12

public static final int DISMISSED 

User dismissed an item.

See Also

Constant Value: 15

Added in API level XE12

public static final int ERROR 

An error occurred.

See Also

Constant Value: 11

Added in API level XE12

public static final int SELECTED 

An item became selected.

See Also

Constant Value: 14

Added in API level XE12

public static final int SUCCESS 

An action completed successfully.

See Also

Constant Value: 12

Added in API level XE12

public static final int TAP 

User tapped on item.

See Also

Constant Value: 13


Portions of this page are reproduced from work created and shared by Google and used according to terms described in the Creative Commons 4.0 Attribution License.