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

# MediaSync.OnErrorListener

*** ** * ** ***


`
public
static


interface
MediaSync.OnErrorListener
`


`


`

|---|
| android.media.MediaSync.OnErrorListener |

<br />

*** ** * ** ***

Interface definition of a callback to be invoked when there
has been an error during an asynchronous operation (other errors
will throw exceptions at method call time).

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/media/MediaSync.OnErrorListener#onError(android.media.MediaSync,%20int,%20int)(https://developer.android.com/reference/android/media/MediaSync sync, int what, int extra) ` Called to indicate an error. |

## Public methods

### onError

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

```
public abstract void onError (MediaSync sync, 
                int what, 
                int extra)
```

Called to indicate an error.

<br />

| Parameters ||
|---|---|
| `sync` | `MediaSync`: The MediaSync the error pertains to. This value cannot be `null`. <br /> |
| `what` | `int`: The type of error that has occurred: - `https://developer.android.com/reference/android/media/MediaSync#MEDIASYNC_ERROR_AUDIOTRACK_FAIL` - `https://developer.android.com/reference/android/media/MediaSync#MEDIASYNC_ERROR_SURFACE_FAIL` <br /> |
| `extra` | `int`: an extra code, specific to the error. Typically implementation dependent. <br /> |