setOnErrorListener

abstract fun setOnErrorListener(listener: (what: Int, extra: Int) -> Boolean)

Register a callback to be invoked when an error has happened during an asynchronous operation.

Parameters

listener

the callback that will be run

Listener returns True if it handled the error, false if it didn't. Returning false, or not having an OnErrorListener at all, will cause the OnCompletionListener to be called.