Столкнулся с проблемой.
Фоновая служба закрывается вместе с приложением под андроид 14+.
запуск службы
JavaService.startForeground(NotificationId, Notification,
TJServiceInfo.JavaClass.FOREGROUND_SERVICE_TYPE_DATA_SYNC
);
Создание Notification
Result := TJapp_NotificationCompat_Builder.JavaClass.init(
TAndroidHelper.Context, StringToJString(NotificationChannelId))
.setSmallIcon(GetNotificationIconId)
.setContentTitle(StrToJCharSequence(msg))
.setContentText(StrToJCharSequence('Tap here to open application'))
.setPriority(TJNotification.JavaClass.PRIORITY_DEFAULT)
.setColor($8594CD)
.setContentIntent(GetActivityPendingIntent)
.setOngoing(True)
.setForegroundServiceBehavior(TJapp_NotificationCompat.JavaClass.FOREGROUND_SERVICE_IMMEDIATE)
.setWhen(TJDate.Create.getTime)
.build;
Кто-нибудь сталкивался с таким? как заставить службу работать после закрытия приложения?