Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/view/SoundEffectConstants#constants) \| [Methods](https://developer.android.com/reference/android/view/SoundEffectConstants#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/SoundEffectConstants#inhmethods)

# SoundEffectConstants

*** ** * ** ***

` public class SoundEffectConstants `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.SoundEffectConstants |

<br />

*** ** * ** ***

Constants to be used to play sound effects via `https://developer.android.com/reference/android/view/View#playSoundEffect(int)`

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/SoundEffectConstants#CLICK` <br /> |
| `int` | `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_DOWN` Effect id for a navigation down |
| `int` | `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_LEFT` Effect id for a navigation left |
| `int` | `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_DOWN` Effect id for a repeatedly triggered navigation down, e.g. due to long pressing a button |
| `int` | `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_LEFT` Effect id for a repeatedly triggered navigation left, e.g. due to long pressing a button |
| `int` | `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_RIGHT` Effect id for a repeatedly triggered navigation right, e.g. due to long pressing a button |
| `int` | `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_UP` Effect id for a repeatedly triggered navigation up, e.g. due to long pressing a button |
| `int` | `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_RIGHT` Effect id for a navigation right |
| `int` | `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_UP` Effect id for a navigation up |

| ### Public methods ||
|---|---|
| ` static int` | ` https://developer.android.com/reference/android/view/SoundEffectConstants#getConstantForFocusDirection(int,%20boolean)(int direction, boolean repeating) ` Get the sonification constant for the focus directions |
| ` static int` | ` https://developer.android.com/reference/android/view/SoundEffectConstants#getContantForFocusDirection(int)(int direction) ` Get the sonification constant for the focus directions. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### CLICK

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CLICK
```

<br />

<br />

Constant Value: 0 (0x00000000)

### NAVIGATION_DOWN

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_DOWN
```

Effect id for a navigation down

<br />

Constant Value: 4 (0x00000004)

### NAVIGATION_LEFT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_LEFT
```

Effect id for a navigation left

<br />

Constant Value: 1 (0x00000001)

### NAVIGATION_REPEAT_DOWN

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_REPEAT_DOWN
```

Effect id for a repeatedly triggered navigation down, e.g. due to long pressing a button

<br />

Constant Value: 8 (0x00000008)

### NAVIGATION_REPEAT_LEFT

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_REPEAT_LEFT
```

Effect id for a repeatedly triggered navigation left, e.g. due to long pressing a button

<br />

Constant Value: 5 (0x00000005)

### NAVIGATION_REPEAT_RIGHT

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_REPEAT_RIGHT
```

Effect id for a repeatedly triggered navigation right, e.g. due to long pressing a button

<br />

Constant Value: 7 (0x00000007)

### NAVIGATION_REPEAT_UP

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_REPEAT_UP
```

Effect id for a repeatedly triggered navigation up, e.g. due to long pressing a button

<br />

Constant Value: 6 (0x00000006)

### NAVIGATION_RIGHT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_RIGHT
```

Effect id for a navigation right

<br />

Constant Value: 3 (0x00000003)

### NAVIGATION_UP

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_UP
```

Effect id for a navigation up

<br />

Constant Value: 2 (0x00000002)

## Public methods

### getConstantForFocusDirection

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int getConstantForFocusDirection (int direction, 
                boolean repeating)
```

Get the sonification constant for the focus directions

<br />

| Parameters ||
|---|---|
| `direction` | `int`: The direction of the focus. Value is one of the following: - `https://developer.android.com/reference/android/view/View#FOCUS_BACKWARD` - `https://developer.android.com/reference/android/view/View#FOCUS_FORWARD` - `https://developer.android.com/reference/android/view/View#FOCUS_LEFT` - `https://developer.android.com/reference/android/view/View#FOCUS_UP` - `https://developer.android.com/reference/android/view/View#FOCUS_RIGHT` - `https://developer.android.com/reference/android/view/View#FOCUS_DOWN` |
| `repeating` | `boolean`: True if the user long-presses a direction <br /> |

| Returns ||
|---|---|
| `int` | The appropriate sonification constant. Value is one of the following: - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_LEFT` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_UP` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_RIGHT` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_DOWN` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_LEFT` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_UP` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_RIGHT` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_DOWN` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | when the passed direction is not one of the documented values. |

### getContantForFocusDirection

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int getContantForFocusDirection (int direction)
```

Get the sonification constant for the focus directions.

<br />

| Parameters ||
|---|---|
| `direction` | `int`: The direction of the focus. Value is one of the following: - `https://developer.android.com/reference/android/view/View#FOCUS_BACKWARD` - `https://developer.android.com/reference/android/view/View#FOCUS_FORWARD` - `https://developer.android.com/reference/android/view/View#FOCUS_LEFT` - `https://developer.android.com/reference/android/view/View#FOCUS_UP` - `https://developer.android.com/reference/android/view/View#FOCUS_RIGHT` - `https://developer.android.com/reference/android/view/View#FOCUS_DOWN` |

| Returns ||
|---|---|
| `int` | The appropriate sonification constant. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | when the passed direction is not one of the documented values. |