Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show playback notification for basic player implementation #1369

Open
Debayudh opened this issue May 11, 2024 · 1 comment
Open

How to show playback notification for basic player implementation #1369

Debayudh opened this issue May 11, 2024 · 1 comment
Assignees
Labels

Comments

@Debayudh
Copy link

Is there a way to show the playback notification for basic player implementation without having to implement MediaSessionService and all?
I think this was possible in exoplayer with PlayerNotificationManager, but it seems that does not work in media3.

@marcbaechinger
Copy link
Contributor

Sorry for my late response.

There is still a PlayerNotificationManager available in the UI module. Have you tried using this? The notification may look a bit different than what is provided by the DefaultMediaNotificationProvider. However, starting with API 32 the UMO will be displayed instead of the notification.

You need to set the platform session token with setSessionToken(MediaSession.Token)? You can get the platform token by calling session.getPlatformToken() to get that token.

Let me know whether this works for you if you try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants