BannerItem

class BannerItem(var id: String? = null, var bannerUrl: String? = null, var webLink: String? = null)

BannerItem — represents a promotional or informational banner for the UI.

Typically retrieved via com.advantahealth.api.ui.UserInterface.getBannerImages and displayed in carousels or on the home/dashboard screen.

Per the product banner-click rule, when the banner is tapped open webLink (the banner's hyperlink), not the bannerUrl image.

Android (Kotlin) — rendering a banner carousel

lifecycleScope.launch {
val banners = AFCore.userInterface().getBannerImages()
bannerCarousel.submitList(banners)
}

iOS (Swift) — showing banners

Task {
let banners = try await AFCore.shared.userInterface().getBannerImages()
self.bannerCarousel.update(banners)
}

Constructors

Link copied to clipboard
constructor(id: String? = null, bannerUrl: String? = null, webLink: String? = null)

Properties

Link copied to clipboard

Absolute URL of the banner image to display, or null when no image is available.

Link copied to clipboard
var id: String?

Unique identifier of the banner. null when the backend omits it.

Link copied to clipboard

Optional URL to open when the banner is tapped; null for a non-interactive banner.

Functions

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