Exoplayer 通知未在真实设备上显示,但在模拟器中显示良好

Exoplayer notification is not showing on real device but showing in emulator well

我正在使用最新的 exoplayer api
'com.google.android.exoplayer:exoplayer:2.14.0'

我要用 PlayerNotificationManager.Builder 显示的代码是

 PlayerNotificationManager notiBuilder = new PlayerNotificationManager.Builder(getApplicationContext()
    ,NOTI_ID,CHANNEL_ID,new MediaDescripTo()).build();
    notiBuilder.setControlDispatcher(new DispatcherDef());

    notiBuilder.setUseNextAction(false);
    notiBuilder.setUsePreviousAction(false);
    notiBuilder.setPlayer(exoPlayer);

我没有从 Log cat 收到任何错误 注意:我是新手,没有提前找到this.Thanks的任何解决方案

PlayerNotificationManager.Builder myNoti = new PlayerNotificationManager.Builder(getApplicationContext()
                , NOTI_ID, CHANNEL_ID, new MediaDescripTo());
        myNoti.setNotificationListener(new NotiListener());
        myNoti.setChannelImportance(NotificationUtil.IMPORTANCE_LOW);
        myNoti.setChannelNameResourceId(R.string.noti_name);

        notiBuilder = myNoti.build();
        notiBuilder.setControlDispatcher(new DispatcherDef());
        notiBuilder.setUseNextAction(true);
        notiBuilder.setUsePreviousAction(true);
        notiBuilder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC);
        notiBuilder.setPlayer(exoPlayer);

我首先为 PlayerNotificationManager.Builder 创建了两个实例,其次仅为 PlayerNotificationManager 创建了两个实例,然后我为通知构建器设置了 Channel Id,然后它也在真实设备中显示。谢谢