# IBinder.DeathRecipient

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

# IBinder.DeathRecipient

*** ** * ** ***

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

`
public
static


interface
IBinder.DeathRecipient
`  
`


`

|-----------------------------------|
| android.os.IBinder.DeathRecipient |

<br />

*** ** * ** ***

Interface for receiving a callback when the process hosting an IBinder has gone away.  
**See also:**

- [IBinder.linkToDeath(DeathRecipient, int)](https://developer.android.com/reference/android/os/IBinder#linkToDeath(android.os.IBinder.DeathRecipient,%20int))

## Summary

|                                                                                                                                         ### Public methods                                                                                                                                         ||
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[binderDied](https://developer.android.com/reference/android/os/IBinder.DeathRecipient#binderDied())`() `                                                                                                                                                                     |
| ` default void`  | ` `[binderDied](https://developer.android.com/reference/android/os/IBinder.DeathRecipient#binderDied(android.os.IBinder))`(`[IBinder](https://developer.android.com/reference/android/os/IBinder)` who) ` 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#ApiLevels)  

```
public abstract void binderDied ()
```

<br />

<br />

### binderDied

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

```
public void binderDied (IBinder who)
```

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()](https://developer.android.com/reference/android/os/IBinder.DeathRecipient#binderDied())is called.

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

<br />

|                                        Parameters                                        ||
|-------|-----------------------------------------------------------------------------------|
| `who` | `IBinder`: The IBinder that has become invalid This value cannot be`null`. <br /> |