# MediaQualityManager.PictureProfileCallback

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

# PictureProfileCallback

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/media/quality/MediaQualityManager.PictureProfileCallback "View this page in Java")  

```
abstract class PictureProfileCallback
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                       ||
| ↳ | [android.media.quality.MediaQualityManager.PictureProfileCallback](https://developer.android.com/reference/kotlin/android/media/quality/MediaQualityManager.PictureProfileCallback#) |

Callback used to monitor status of picture profiles

## Summary

|                                                                               Public constructors                                                                                ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [PictureProfileCallback](https://developer.android.com/reference/kotlin/android/media/quality/MediaQualityManager.PictureProfileCallback#PictureProfileCallback())`()` <br /> |

|                                                                                                                                                                                                                                                                                                                                                                             Public methods                                                                                                                                                                                                                                                                                                                                                                             ||
|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onError](https://developer.android.com/reference/kotlin/android/media/quality/MediaQualityManager.PictureProfileCallback#onError(kotlin.String,%20kotlin.Int))`(`profileId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `errorCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` This is invoked when an issue has occurred.                                                                                                                                                                                                                                                                           |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onParameterCapabilitiesChanged](https://developer.android.com/reference/kotlin/android/media/quality/MediaQualityManager.PictureProfileCallback#onParameterCapabilitiesChanged(kotlin.String,%20kotlin.collections.MutableList))`(`profileId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `updatedCaps:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[ParameterCapability](https://developer.android.com/reference/kotlin/android/media/quality/ParameterCapability)!>`)` This is invoked when parameter capabilities has been changed due to status changes of the content. |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onPictureProfileAdded](https://developer.android.com/reference/kotlin/android/media/quality/MediaQualityManager.PictureProfileCallback#onPictureProfileAdded(kotlin.String,%20android.media.quality.PictureProfile))`(`profileId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `profile:` `[PictureProfile](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile)`)` This is invoked when a picture profile has been added.                                                                                                                                                                                  |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onPictureProfileRemoved](https://developer.android.com/reference/kotlin/android/media/quality/MediaQualityManager.PictureProfileCallback#onPictureProfileRemoved(kotlin.String,%20android.media.quality.PictureProfile))`(`profileId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `profile:` `[PictureProfile](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile)`)` This is invoked when a picture profile has been removed.                                                                                                                                                                            |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onPictureProfileUpdated](https://developer.android.com/reference/kotlin/android/media/quality/MediaQualityManager.PictureProfileCallback#onPictureProfileUpdated(kotlin.String,%20android.media.quality.PictureProfile))`(`profileId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `profile:` `[PictureProfile](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile)`)` This is invoked when a picture profile has been updated.                                                                                                                                                                            |

## Public constructors

### PictureProfileCallback

```
PictureProfileCallback()
```

## Public methods

### onError

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

```
open fun onError(
    profileId: String?, 
    errorCode: Int
): Unit
```

This is invoked when an issue has occurred.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ||
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `profileId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?:the profile ID related to the error.`null`if there is no associated profile.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `errorCode` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the error code Value is[android.media.quality.PictureProfile#ERROR_UNKNOWN](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile#ERROR_UNKNOWN:kotlin.Int),[android.media.quality.PictureProfile#ERROR_NO_PERMISSION](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile#ERROR_NO_PERMISSION:kotlin.Int),[android.media.quality.PictureProfile#ERROR_DUPLICATE](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile#ERROR_DUPLICATE:kotlin.Int),[android.media.quality.PictureProfile#ERROR_INVALID_ARGUMENT](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile#ERROR_INVALID_ARGUMENT:kotlin.Int), or[android.media.quality.PictureProfile#ERROR_NOT_ALLOWLISTED](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile#ERROR_NOT_ALLOWLISTED:kotlin.Int) |

### onParameterCapabilitiesChanged

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

```
open fun onParameterCapabilitiesChanged(
    profileId: String?, 
    updatedCaps: MutableList<ParameterCapability!>
): Unit
```

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

|                                                                                                                                            Parameters                                                                                                                                            ||
|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `profileId`   | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?:the ID of the profile used by the media content.`null`if there is no associated profile                                                                                                         |
| `updatedCaps` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\<[ParameterCapability](https://developer.android.com/reference/kotlin/android/media/quality/ParameterCapability)!\>:the updated capabilities. This value cannot be`null`. |

### onPictureProfileAdded

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

```
open fun onPictureProfileAdded(
    profileId: String, 
    profile: PictureProfile
): Unit
```

This is invoked when a picture profile has been added.

|                                                                               Parameters                                                                                ||
|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `profileId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):the ID of the profile. This value cannot be`null`.                        |
| `profile`   | [PictureProfile](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile):the newly added profile. This value cannot be`null`. |

### onPictureProfileRemoved

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

```
open fun onPictureProfileRemoved(
    profileId: String, 
    profile: PictureProfile
): Unit
```

This is invoked when a picture profile has been removed.

|                                                                             Parameters                                                                              ||
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| `profileId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):the ID of the profile. This value cannot be`null`.                    |
| `profile`   | [PictureProfile](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile):the removed profile. This value cannot be`null`. |

### onPictureProfileUpdated

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

```
open fun onPictureProfileUpdated(
    profileId: String, 
    profile: PictureProfile
): Unit
```

This is invoked when a picture profile has been updated.

|                                                                                  Parameters                                                                                   ||
|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `profileId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):the ID of the profile. This value cannot be`null`.                              |
| `profile`   | [PictureProfile](https://developer.android.com/reference/kotlin/android/media/quality/PictureProfile):the profile with updated info. This value cannot be`null`. |