AOD (Always on Display) shows "No Title" when using MediaSessionConnector(mediaSession)
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I am using a foreground service to manage my player and so far everything seems to be working as expected except for one thing.
When the player is playing a media item, the Always on Display shows our icon with "No Title". Am I missing something, or doing things out of order? This is on Android 13 on a Pixel 7 Pro.
```
player = new ExoPlayer.Builder(getApplicationContext()).build();
mediaSession = new MediaSessionCompat(getApplicationContext(), TAG);
MediaSessionConnector mediaSessionConnector = new MediaSessionConnector(mediaSession);
mediaSessionConnector.setPlayer(player);
mediaSession.setActive(true);
player.setAudioAttributes(mAudioAttributes, /* handleAudioFocus= */ true);
player.setPauseAtEndOfMediaItems(true);
notificationManager = new PlayerNotificationManager.Builder(this, notificationId, channelId)
.setNotificationListener(notificationListener)
.setMediaDescriptionAdapter(descriptionAdapter)
.setChannelNameResourceId(R.string.app_name)
.build();
notificationManager.setVisibility(NotificationCompat.VISIBILITY_PUBLIC);
notificationManager.setPlayer(player);
notificationManager.setPriority(NotificationCompat.PRIORITY_MAX);
notificationManager.setUseRewindAction(false);
notificationManager.setUseFastForwardAction(false);
notificationManager.setUseChronometer(true);
notificationManager.setSmallIcon(R.drawable.blb_reverse_icon);
notificationManager.setMediaSessionToken(mediaSession.getSessionToken());
Contributor guide
Assessment
This issue has not been assessed yet.