隐藏状态栏的通知图标 android

问题描述

我在从服务通知中隐藏状态栏中的通知图标时遇到问题。

这是我所做的: 我将通知优先级设置为 min,让他们静音

   NotificationCompat.Builder builder = new NotificationCompat.Builder(this,"test");
    builder.setSmallIcon(R.drawable.notif);
    builder.setContentTitle(getString(R.string.app_name));
    builder.setContentText(profile.mName);
    builder.setContentIntent(pendingIntent);
    builder.setNotificationSilent();
    builder.setPriority(NotificationCompat.PRIORITY_MIN);

在频道中,我也将优先级设置为 min 但我仍然在状态栏中看到通知图标

      NotificationChannel channel = new NotificationChannel(id,getApplicationContext().getString(R.string.app_name),NotificationManager.IMPORTANCE_MIN);
        channel.setSound(null,null);
        channel.setImportance(NotificationManager.IMPORTANCE_MIN);
        channel.enableVibration(false);

App icon I need to remove

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)