I would like to enable all of the notification options, but I can't do it(see sreenshot). I installed telegram and all of the options for it are enabled by default. Why and how?
Currently I have this code:
NotificationManager notifManager=(NotificationManager)getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationChannel mChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, "My Notifications", NotificationManager.IMPORTANCE_HIGH); // Configure the notification channel. mChannel.setDescription("Common notifications"); mChannel.enableLights(true); mChannel.setLightColor(Color.RED); mChannel.setVibrationPattern(new long[]{0, 1000, 500, 1000}); mChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC); mChannel.enableVibration(true); notifManager.createNotificationChannel(mChannel); } NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getApplicationContext(), NOTIFICATION_CHANNEL_ID) .setDefaults(Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE) .setPriority(NotificationCompat.PRIORITY_HIGH) .setWhen(System.currentTimeMillis()) .setSmallIcon(icon) .setColor(color) .setTicker("") .setContentTitle("Title") .setContentText("ContextText") .setContentInfo("Info") .setVisibility(Notification.VISIBILITY_PUBLIC) .setAutoCancel(true); NotificationManager mNotificationManager = (NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE); mNotificationManager.notify(SOMEID, mBuilder.build());
IMPORTANCE_HIGHsince the beginning? Once the channel is created, you cannot modify its importance, so maybe the channel saved in your device isn't exactly the one you're using now in your code.