Don't delay notification on API 31 and up
@@ -70,7 +70,8 @@ public class TrackingInfoNotificationBuilder {
openPendingIntent)
.addAction(R.drawable.ic_notification_close,
application.getString(R.string.notification_tracking_close),
- closePendingIntent);
+ closePendingIntent)
+ .setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE);
return builder.build();
}
