PlayerNotificationManager不显示在android exoplayer上播放视频的通知?
我的应用程序播放视频 我正在关注这一点 代码相同PlayerNotificationManager不显示在android exoplayer上播放视频的通知?,android,exoplayer,Android,Exoplayer,我的应用程序播放视频 我正在关注这一点 代码相同 PlayerNotificationManager playerNotificationManager = new PlayerNotificationManager( appCMSPresenter.getCurrentContext(), "kingkdfn", 459, new DescriptionAdapter()); playerNotificatio
PlayerNotificationManager playerNotificationManager = new PlayerNotificationManager(
appCMSPresenter.getCurrentContext(),
"kingkdfn",
459, new DescriptionAdapter());
playerNotificationManager.setPlayer(getPlayer());
描述适应器
public class DescriptionAdapter implements
PlayerNotificationManager.MediaDescriptionAdapter {
@Override
public String getCurrentContentTitle(Player player) {
int window = player.getCurrentWindowIndex();
return "getTitle(window)";
}
@Nullable
@Override
public String getCurrentContentText(Player player) {
int window = player.getCurrentWindowIndex();
return "getDescription(window)";
}
@Nullable
@Override
public Bitmap getCurrentLargeIcon(Player player,
PlayerNotificationManager.BitmapCallback callback) {
return null;
}
@Nullable
@Override
public PendingIntent createCurrentContentIntent(Player player) {
return null;
}
}
全部添加到舱单中
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
但在播放视频时,仍不会显示通知。
我需要补充什么吗