ContentCardUIProvider
Messaging extension implementation of AepUIContentProvider. ContentCardUIProvider
is responsible for fetching and managing the content for a given surface. It uses Adobe Messaging APIs to retrieve propositions and transform them into UI templates for display.
Methods
getContent
Retrieves a flow of AepUITemplate lists for the given surface. The flow emits updates whenever new content is fetched.
Returns
A flow that emits lists of AepUITemplates.
Syntax
Copied to your clipboardoverride suspend fun getContent(): Flow<List<AepUITemplate>>
getContentCardUI
Retrieves a flow of AepUI instances for the given surface. This function initiates the content fetch using getContent and then returns a flow of AepUI instances that represent the UI templates. The flow emits updates whenever new content is fetched or any changes occur.
Returns
A Flow that emits a list of AepUI instances.
Syntax
Copied to your clipboardsuspend fun getContentCardUI(): Flow<List<AepUI<*, *>>>
refreshContent
Updates the flow returned by getContent with the latest cached content cards for the given surface.
Syntax
Copied to your clipboardoverride suspend fun refreshContent()