MenuItem

class MenuItem(var id: String? = null, var name: String? = null, var key: String? = null, var iconUrl: String? = null, var action: String? = null, var webUrl: String? = null, var sectionId: String? = null, var sectionTitle: String? = null, var sectionType: String? = null, var accessibilityLabel: String? = null)

MenuItem — represents a menu entry in the application.

Returned by com.advantahealth.api.ui.UserInterface.getMenuItems and typically displayed in sidebars, settings menus, or quick actions.

For Wellness-tab tile gating, items are matched against the local catalog by lowercased substring on key/name/action.

Android (Kotlin)

val menuItems = AFCore.userInterface().getMenuItems()
drawerMenu.update(menuItems)

iOS (Swift)

let menuItems = try await AFCore.shared.userInterface().getMenuItems()
self.drawerMenu.render(menuItems)

Constructors

Link copied to clipboard
constructor(id: String? = null, name: String? = null, key: String? = null, iconUrl: String? = null, action: String? = null, webUrl: String? = null, sectionId: String? = null, sectionTitle: String? = null, sectionType: String? = null, accessibilityLabel: String? = null)
constructor(id: String?, name: String?, key: String?, iconUrl: String?, action: String?, webUrl: String?)

The 1.11 constructor. Kotlin default arguments do not reach Swift, so without it a Swift caller written against 1.11 (a preview, a test fake) would stop compiling.

Properties

Link copied to clipboard

Screen-reader label, or null to use name.

Link copied to clipboard

Optional action string the host resolves on selection (e.g. a deep link or feature key), or null.

Link copied to clipboard

Absolute URL of the entry's icon, or null when none is set.

Link copied to clipboard
var id: String?

Unique identifier of the menu entry, or null when omitted.

Link copied to clipboard
var key: String?

Stable key used for analytics and routing, or null: the app route (for example MY_DASHBOARD), WEB for a web page, or an action such as LOGOUT. null when the entry leads somewhere the SDK has no key for.

Link copied to clipboard
var name: String?

Display name shown for the entry, or null.

Link copied to clipboard

AIDE section the entry belongs to, or null. Items arrive in reading order, so consecutive items with the same section form that section.

Link copied to clipboard

Title of that section, or null.

Link copied to clipboard

Layout the section asks for: featured-card, tile-grid or link-list, or null. Hosts should render an unknown type as a list.

Link copied to clipboard

Optional web link to open when the entry is selected, or null.

Functions

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