Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/media/quality/MediaQualityManager.SoundProfileCallback#pubctors) \| [Methods](https://developer.android.com/reference/android/media/quality/MediaQualityManager.SoundProfileCallback#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/quality/MediaQualityManager.SoundProfileCallback#inhmethods)

# MediaQualityManager.SoundProfileCallback

*** ** * ** ***


`
public
static

abstract
class
MediaQualityManager.SoundProfileCallback
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.media.quality.MediaQualityManager.SoundProfileCallback |

<br />

*** ** * ** ***

Callback used to monitor status of sound profiles.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/media/quality/MediaQualityManager.SoundProfileCallback#SoundProfileCallback()() ` |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/media/quality/MediaQualityManager.SoundProfileCallback#onError(java.lang.String,%20int)(https://developer.android.com/reference/java/lang/String profileId, int errorCode) ` This is invoked when an issue has occurred. |
| ` void` | ` https://developer.android.com/reference/android/media/quality/MediaQualityManager.SoundProfileCallback#onParameterCapabilitiesChanged(java.lang.String,%20java.util.List<android.media.quality.ParameterCapability>)(https://developer.android.com/reference/java/lang/String profileId, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/quality/ParameterCapability> updatedCaps) ` This is invoked when parameter capabilities has been changed due to status changes of the content. |
| ` void` | ` https://developer.android.com/reference/android/media/quality/MediaQualityManager.SoundProfileCallback#onSoundProfileAdded(java.lang.String,%20android.media.quality.SoundProfile)(https://developer.android.com/reference/java/lang/String profileId, https://developer.android.com/reference/android/media/quality/SoundProfile profile) ` This is invoked when a sound profile has been added. |
| ` void` | ` https://developer.android.com/reference/android/media/quality/MediaQualityManager.SoundProfileCallback#onSoundProfileRemoved(java.lang.String,%20android.media.quality.SoundProfile)(https://developer.android.com/reference/java/lang/String profileId, https://developer.android.com/reference/android/media/quality/SoundProfile profile) ` This is invoked when a sound profile has been removed. |
| ` void` | ` https://developer.android.com/reference/android/media/quality/MediaQualityManager.SoundProfileCallback#onSoundProfileUpdated(java.lang.String,%20android.media.quality.SoundProfile)(https://developer.android.com/reference/java/lang/String profileId, https://developer.android.com/reference/android/media/quality/SoundProfile profile) ` This is invoked when a sound profile has been updated. |

| ### 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*. | ||

## Public constructors

### SoundProfileCallback

```
public SoundProfileCallback ()
```

<br />

<br />

## Public methods

### onError

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

```
public void onError (String profileId, 
                int errorCode)
```

This is invoked when an issue has occurred.

<br />

| Parameters ||
|---|---|
| `profileId` | `String`: the profile ID related to the error. `null` if there is no associated profile. <br /> |
| `errorCode` | `int`: the error code. Value is one of the following: - `https://developer.android.com/reference/android/media/quality/SoundProfile#ERROR_UNKNOWN` - `https://developer.android.com/reference/android/media/quality/SoundProfile#ERROR_NO_PERMISSION` - `https://developer.android.com/reference/android/media/quality/SoundProfile#ERROR_DUPLICATE` - `https://developer.android.com/reference/android/media/quality/SoundProfile#ERROR_INVALID_ARGUMENT` - `https://developer.android.com/reference/android/media/quality/SoundProfile#ERROR_NOT_ALLOWLISTED` |

### onParameterCapabilitiesChanged

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

```
public void onParameterCapabilitiesChanged (String profileId, 
                List<ParameterCapability> updatedCaps)
```

This is invoked when parameter capabilities has been changed due to status changes of the
content.

<br />

| Parameters ||
|---|---|
| `profileId` | `String`: the ID of the profile used by the media content. `null` if there is no associated profile <br /> |
| `updatedCaps` | `List`: the updated capabilities. This value cannot be `null`. <br /> |

### onSoundProfileAdded

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

```
public void onSoundProfileAdded (String profileId, 
                SoundProfile profile)
```

This is invoked when a sound profile has been added.

<br />

| Parameters ||
|---|---|
| `profileId` | `String`: the ID of the profile. This value cannot be `null`. <br /> |
| `profile` | `SoundProfile`: the newly added profile. This value cannot be `null`. <br /> |

### onSoundProfileRemoved

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

```
public void onSoundProfileRemoved (String profileId, 
                SoundProfile profile)
```

This is invoked when a sound profile has been removed.

<br />

| Parameters ||
|---|---|
| `profileId` | `String`: the ID of the profile. This value cannot be `null`. <br /> |
| `profile` | `SoundProfile`: the removed profile. This value cannot be `null`. <br /> |

### onSoundProfileUpdated

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

```
public void onSoundProfileUpdated (String profileId, 
                SoundProfile profile)
```

This is invoked when a sound profile has been updated.

<br />

| Parameters ||
|---|---|
| `profileId` | `String`: the ID of the profile. This value cannot be `null`. <br /> |
| `profile` | `SoundProfile`: the profile with updated info. This value cannot be `null`. <br /> |