TrayNotification

class TrayNotification(var id: Long = 0, var subject: String? = null, var body: String? = null, var sticky: Boolean? = false, var urgent: Boolean? = false, var hyperlink: String? = null, var iconUrl: String? = null, var notificationType: Int? = null, var target: Int? = null, var createDateTime: String? = null)

TrayNotification — represents a notification displayed in the tray/notification center.

Retrieved via com.advantahealth.api.ui.UserInterface.getTrayNotifications.

Android (Kotlin) — fetching tray notifications

lifecycleScope.launch {
val notifications = AFCore.userInterface().getTrayNotifications()
tray.render(notifications)
}

iOS (Swift)

Task {
let notifications = try await AFCore.shared.userInterface().getTrayNotifications()
self.tray.render(notifications)
}

Constructors

Link copied to clipboard
constructor(id: Long = 0, subject: String? = null, body: String? = null, sticky: Boolean? = false, urgent: Boolean? = false, hyperlink: String? = null, iconUrl: String? = null, notificationType: Int? = null, target: Int? = null, createDateTime: String? = null)

Properties

Link copied to clipboard
var body: String?

Body text / message content, or null.

Link copied to clipboard

Creation timestamp as the backend-provided string, or null.

Link copied to clipboard

Optional link target to open when the notification is tapped, or null.

Link copied to clipboard

Optional absolute URL of the notification icon, or null.

Link copied to clipboard
var id: Long

Unique identifier of the notification; 0 when unset.

Link copied to clipboard

Backend-defined integer type identifier used to classify the notification, or null.

Link copied to clipboard

true when the notification should remain until explicitly dismissed; null/false when it may auto-clear.

Link copied to clipboard

Title or subject line, or null.

Link copied to clipboard
var target: Int?

Optional id of the entity this notification refers to (its meaning depends on notificationType), or null.

Link copied to clipboard

true when the notification is high priority and should be surfaced prominently; null/false otherwise.

Functions

Link copied to clipboard
open override fun toString(): String