# DefaultMediaNotificationProvider.NotificationIdProvider

# DefaultMediaNotificationProvider.NotificationIdProvider

Artifact:[androidx.media3:media3-session](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/session/DefaultMediaNotificationProvider.java+class:androidx.media3.session.DefaultMediaNotificationProvider.NotificationIdProvider)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/session/DefaultMediaNotificationProvider.NotificationIdProvider "View this page in Java")

<br />

```
interface DefaultMediaNotificationProvider.NotificationIdProvider
```

<br />

*** ** * ** ***

Provides notification IDs for posting media notifications for given media sessions.  

|                                                                                                                        See also                                                                                                                         |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setNotificationIdProvider](https://developer.android.com/reference/kotlin/androidx/media3/session/DefaultMediaNotificationProvider.Builder#setNotificationIdProvider(androidx.media3.session.DefaultMediaNotificationProvider.NotificationIdProvider)) |   |

## Summary

|                            ### Public functions                             |
|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [getNotificationId](https://developer.android.com/reference/kotlin/androidx/media3/session/DefaultMediaNotificationProvider.NotificationIdProvider#getNotificationId(androidx.media3.session.MediaSession))`(mediaSession: `[MediaSession](https://developer.android.com/reference/kotlin/androidx/media3/session/MediaSession)`!)` Returns the notification ID for the media notification of the given session. |

## Public functions

### getNotificationId

```
fun getNotificationId(mediaSession: MediaSession!): Int
```

Returns the notification ID for the media notification of the given session.