使用ExoPlayer和PlayerNotificationManager在通知中显示媒体播放进度,现在如何单击通知打开应用程序?
答案 0 :(得分:0)
当您尝试通过PlayerNotificationManager创建NotificationChannel时,直接在MediaDescriptor下覆盖此方法
@Override
public PendingIntent createCurrentContentIntent(Player player){
Intent intent = new Intent(YourService.this,YourMediaActivity.class);
PendingIntent contentPendingIntent = PendingIntent.getActivity
(YourService.this, 0, intent, 0);
return contentPendingIntent;
}