1

I am playing around with notification channels and noticed that the channel importance levels of the emulator don't fit to the NotificationManager constants.

NotificationManager:

public static final int IMPORTANCE_MIN = 1;
public static final int IMPORTANCE_LOW = 2;
public static final int IMPORTANCE_DEFAULT = 3;
public static final int IMPORTANCE_HIGH = 4;
public static final int IMPORTANCE_MAX = 5;

Emulator:

enter image description here

I retrieved the importance level the following way:

NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
        NotificationChannel channel2 = manager.getNotificationChannel(CHANNEL_2_ID);
        int importance = channel2.getImportance();

Am I missing something?

Florian Walther
  • 6,237
  • 5
  • 46
  • 104

0 Answers0