My app plays video
I am following this Exoplayer Notifications
Have the same code
PlayerNotificationManager playerNotificationManager = new PlayerNotificationManager(
appCMSPresenter.getCurrentContext(),
"kingkdfn",
459, new DescriptionAdapter());
playerNotificationManager.setPlayer(getPlayer());
The DescriptionAdapter
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;
}
}
All added in manifest
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
But still the notification is not showing when video is playing. Do I need to add anything extra?