Added foregroundServiceBehavior to service motification

This commit is contained in:
Juha Heinanen
2023-03-30 10:53:01 +03:00
parent 4285df80fb
commit 8198e50adc

View File

@ -1145,6 +1145,8 @@ class BaresipService: Service() {
else
R.layout.status_notification)
)
if (VERSION.SDK_INT >= 31)
snb.foregroundServiceBehavior = Notification.FOREGROUND_SERVICE_DEFAULT
startForeground(STATUS_NOTIFICATION_ID, snb.build())
}