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

# MediaDrm.OnExpirationUpdateListener

*** ** * ** ***

` public static interface MediaDrm.OnExpirationUpdateListener `   
` `

|---|
| android.media.MediaDrm.OnExpirationUpdateListener |

<br />

*** ** * ** ***

Interface definition for a callback to be invoked when a drm session expiration update occurs

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/media/MediaDrm.OnExpirationUpdateListener#onExpirationUpdate(android.media.MediaDrm,%20byte[],%20long)(https://developer.android.com/reference/android/media/MediaDrm md, byte[] sessionId, long expirationTime) ` Called when a session expiration update occurs, to inform the app about the change in expiration time |

## Public methods

### onExpirationUpdate

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

```
public abstract void onExpirationUpdate (MediaDrm md, 
                byte[] sessionId, 
                long expirationTime)
```

Called when a session expiration update occurs, to inform the app about the change in expiration time

<br />

| Parameters ||
|---|---|
| `md` | `MediaDrm`: the MediaDrm object on which the event occurred. This value cannot be `null`. <br /> |
| `sessionId` | `byte`: the DRM session ID on which the event occurred. This value cannot be `null`. <br /> |
| `expirationTime` | `long`: the new expiration time for the keys in the session. The time is in milliseconds, relative to the Unix epoch. A time of 0 indicates that the keys never expire. <br /> |