pageView
suspend fun ChatEventHandler.pageView(title: String, uri: String, instant: Instant = Clock.System.now())
send a page viewed event to the server.
onPageView and onPageViewEnded should be invoked from each page (i.e., fragment or activity) in your application, as in:
OnLifecycleEvent { _, event ->
when (event) {
ON_RESUME -> viewModel.onPageView(pageTitle, pageUrl)
ON_PAUSE -> viewModel.onPageViewEnded(pageTitle, pageUrl)
else -> Ignored
}
}Content copied to clipboard
Parameters
title
application-defined "title" string uniquely identifying the page viewed. Examples might include "category?cellphones" or "details?item=4568".
uri
application-defined "uri" uniquely identifying the page viewed. The uri must be a valid uri, although a relative URI is allowed. Examples might include "com.nice.cxonechat.sample://category/cellphones" or "/details/4568".
instant
instant of the event.