Added media details to dummy notification
This commit is contained in:
parent
f0acfa4263
commit
e6ad131d37
|
@ -444,6 +444,12 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
|
|
||||||
if (!stateManager.isInForeground()) {
|
if (!stateManager.isInForeground()) {
|
||||||
PlaybackServiceNotificationBuilder notificationBuilder = new PlaybackServiceNotificationBuilder(this);
|
PlaybackServiceNotificationBuilder notificationBuilder = new PlaybackServiceNotificationBuilder(this);
|
||||||
|
if (mediaPlayer != null && getPlayable() != null) {
|
||||||
|
notificationBuilder.addMetadata(getPlayable(), mediaSession.getSessionToken(), getStatus(), isCasting);
|
||||||
|
if (notificationBuilder.isIconCached(getPlayable())) {
|
||||||
|
notificationBuilder.loadIcon(getPlayable());
|
||||||
|
}
|
||||||
|
}
|
||||||
startForeground(NOTIFICATION_ID, notificationBuilder.build());
|
startForeground(NOTIFICATION_ID, notificationBuilder.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue