Уведомление постоянно свернутое Android

Как сделать уведомление развернутым по умолчанию?

String NOTIFICATION_CHANNEL_ID = "com.example.simpleapp";
        String channelName = "My Background Service";
        NotificationChannel chan = null;
            chan = new NotificationChannel(NOTIFICATION_CHANNEL_ID, channelName, NotificationManager.IMPORTANCE_DEFAULT);
            chan.setLightColor(Color.BLUE);
            chan.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);

            NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
            assert manager != null;
            manager.createNotificationChannel(chan);
            Notification notification = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID)
                    .setSmallIcon(R.drawable.ua_radio_logo)
                    .setCustomBigContentView(contentView)
                    .build();
                
                    startForeground(1, notification);
                    

введите сюда описание изображениявведите сюда описание изображения


Ответы (1 шт):

Автор решения: ЮрийСПб

Судя по en-SO сделать такое нельзя. Но можно заставить систему (не на всех девайсах) развернуть уведомление с наивысшим приоритетом (оно должно быть самым верхним в шторке):

.setPriority(Notification.PRIORITY_HIGH)
→ Ссылка