# IBinder.DeathRecipient

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

# DeathRecipient

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/os/IBinder.DeathRecipient "View this page in Java")  

```
interface DeathRecipient
```

|------------------------------------------------------------------------------------------------------------------------|
| [android.os.IBinder.DeathRecipient](https://developer.android.com/reference/kotlin/android/os/IBinder.DeathRecipient#) |

Interface for receiving a callback when the process hosting an IBinder has gone away.

## Summary

|                                                                                                                                                                                   Public methods                                                                                                                                                                                    ||
|--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [binderDied](https://developer.android.com/reference/kotlin/android/os/IBinder.DeathRecipient#binderDied())`()` <br />                                                                                                                                                                        |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)     | [binderDied](https://developer.android.com/reference/kotlin/android/os/IBinder.DeathRecipient#binderDied(android.os.IBinder))`(`who:` `[IBinder](https://developer.android.com/reference/kotlin/android/os/IBinder)`)` The function called when the process hosting an IBinder has gone away. |

## Public methods

### binderDied

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

```
abstract fun binderDied(): Unit
```  

### binderDied

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

```
open fun binderDied(who: IBinder): Unit
```

The function called when the process hosting an IBinder has gone away.

This callback will be called from any binder thread like any other binder transaction. If the process receiving this notification is multithreaded then synchronization may be required because other threads may be executing at the same time.

No locks are held in libbinder when #binderDied is called.

There is no need to call[unlinkToDeath](https://developer.android.com/reference/kotlin/android/os/IBinder#unlinkToDeath(android.os.IBinder.DeathRecipient,%20kotlin.Int))in the binderDied callback. The binder is already dead so[unlinkToDeath](https://developer.android.com/reference/kotlin/android/os/IBinder#unlinkToDeath(android.os.IBinder.DeathRecipient,%20kotlin.Int))is a no-op. It will be unlinked when the last local reference of that binder proxy is dropped.

|                                                                     Parameters                                                                      ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `who` | [IBinder](https://developer.android.com/reference/kotlin/android/os/IBinder):The IBinder that has become invalid This value cannot be`null`. |