The Glass Explorer Edition SDK is deprecated. This documentation remains as a historical reference.
Sounds
Stay organized with collections
Save and categorize content based on your preferences.
outlined_flag
Extra constants are added for Glass-specific sound effects, extending the existing AudioManager constants.
To play a Glass-specific sound, call playSoundEffect(int) with the desired sound constant.
Specific constants are provided for different user actions and system events like DISALLOWED, DISMISSED, ERROR, SELECTED, SUCCESS, and TAP.
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
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.
Constant Value:
10
Added in API level XE12
public
static
final
int
DISMISSED
Added in API level XE12
public
static
final
int
ERROR
Added in API level XE12
public
static
final
int
SELECTED
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
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[],[]]