Content
Personalized content - bottom navigation, banners and the Explore / Menu page - read directly from the ContentApi.
This is the content-managed successor of the Mobile API's userInterface() reads. Both keep working side by side: userInterface().getBottomNavigationItems(), getMenuItems(), getBannerImages() and the tray notifications still read the Mobile API unchanged, so an app can move one surface at a time.
What changes compared with userInterface()
Items carry a typed action (com.advantahealth.api.content.model.ContentActionType) and image references (com.advantahealth.api.content.model.ContentMedia) that resolve to any rendition on the image server.
The menu is one page of sections (ContentMenuPage) whose entries carry typed targets, e.g. an in-app
routeKeysuch asSMARTWALKING. The server has already removed the entries the member is not entitled to.Content is localized: pass a BCP-47
localesuch ases-US, ornullfor the member's default.
Caching
Every read revalidates with the server using the content's ETag, so an unchanged placement costs one empty 304 round-trip. The cache is dropped on logout.
Empty content
The ContentApi answers an empty list both when nothing is configured and when it could not resolve the member's content; an empty page means "render nothing", not "confirmed empty". Transport and HTTP failures throw.
Kotlin
val tabs = AFCore.content().getToolbar(locale = null).items
val menu = AFCore.content().getMenu(locale = "es-US")Swift
let tabs = try await AFCore.shared.content().getToolbar(locale: nil).items
let menu = try await AFCore.shared.content().getMenu(locale: "es-US")Functions
The home-screen banner slides (at most twenty).
The raw content of any placement and surfaceCode - the escape hatch for surfaces newer than this SDK's typed reads.
The Explore / Menu page, or null when the server returned no menu page (see "Empty content" above) or one this SDK cannot read.
The bottom-navigation tabs (at most five).