TMDiscoveryListener

Interface for handling discovery and WebView events in the prepurchase flow.

Inheritors

Properties

Link copied to clipboard
abstract val discoveryStateLiveData: LiveData<SingleLiveDataValue<Pair<TMDiscoveryState, String>>>

Observes discovery state changes.

Link copied to clipboard
abstract val loadEventDetailLiveData: LiveData<SingleLiveDataValue<EventDetail>>

Observes event detail loading events.

Link copied to clipboard
abstract val locationUpdateLiveData: LiveData<SingleLiveDataValue<Location>>

Observes location update events.

Link copied to clipboard
abstract val tmPromotedAdLiveData: LiveData<SingleLiveDataValue<PromotedJSON>>

Observes promoted ad click events.

Link copied to clipboard
abstract val visibilityLiveData: LiveData<SingleLiveDataValue<Pair<TMDiscoveryState, Boolean>>>

Observes visibility state changes.

Link copied to clipboard

Observes web analytics events.

Link copied to clipboard

Observes WebView errors.

Functions

Link copied to clipboard
abstract fun didAddToCart(cart: Cart, products: List<Product>, customAttributes: Map<String, String>)

Called when items are added to a cart.

Link copied to clipboard
abstract fun didDismissSearch()

Called when the search UI is dismissed.

Link copied to clipboard
abstract fun didLaunchExternalUrl(url: String)

Called when an external URL is launched.

Link copied to clipboard
abstract fun didLoadEvent(eventDetailId: EventDetail)

Called when an event is loaded.

Link copied to clipboard
abstract fun didLoadHome(url: String)

Called when the home page is loaded.

Link copied to clipboard
abstract fun didLoadNonHome(url: String)

Called when a non-home page is loaded.

Link copied to clipboard
abstract fun didPerformActionWith(action: Map<String, String>)

Called when an action is performed by the user.

Link copied to clipboard
abstract fun didPresentError(error: Error)

Called when an error requires a dialog or state.

Link copied to clipboard

Called when the current location is requested.

Link copied to clipboard

Called when the native location selector is requested.

Link copied to clipboard
abstract fun didRequestSignIn()

Called when a sign-in is requested.

Link copied to clipboard
abstract fun didSearchWith(query: Search)

Called when a search query is entered.

Link copied to clipboard

Called when a search suggestion is selected.

Link copied to clipboard

Called when supported URLs are set.

Link copied to clipboard
abstract fun didSetTitle(title: String)

Called to set the toolbar title.

Link copied to clipboard
abstract fun didShowSearch()

Called when the search UI is shown.

Link copied to clipboard
abstract fun didSignOut()

Called when a sign-out occurs.

Link copied to clipboard
abstract fun didTransaction(transaction: Transaction, products: List<Product>, customAttributes: Map<String, String>)

Called when a transaction is completed.

Link copied to clipboard
abstract fun didUpdateCurrentLocation(location: Location)

Called when the location is updated.

Link copied to clipboard
abstract fun didViewPage(pageView: Map<String, String>)

Called when a page view event occurs.

Link copied to clipboard
abstract fun onInitMFA(json: String)

Called to initialize multi-factor authentication (MFA) with provided JSON data.

Link copied to clipboard
abstract fun onLoginStatusRequested()

Called when the login status is requested.

Link copied to clipboard
abstract fun onPageCommitVisible(view: WebView?, url: String?)

Called when a page becomes visible.

Link copied to clipboard
abstract fun onPageFinished(url: String)

Called when a page finishes loading.

Link copied to clipboard
abstract fun onPageStarted(url: String)

Called when a page starts loading.

Link copied to clipboard
abstract fun onShowSignIn()

Called to initiate a sign-in process without specific configuration.

abstract fun onShowSignIn(json: String)

Called to initiate a sign-in process with provided JSON data.

Link copied to clipboard
abstract fun onTMPromotedClick(promotedJSON: PromotedJSON)

Called when a promoted item is clicked.

Link copied to clipboard
abstract fun onUpdateLogin()

Called when the login state needs to be updated.

Link copied to clipboard
abstract fun onWebViewError(view: WebView?, request: WebResourceRequest?, error: WebResourceError?)

Called when a WebView error occurs.

Link copied to clipboard
abstract fun shouldInterceptURL(url: Uri?)

Called to determine if a URL should be intercepted.