StorytellerDelegate

An interface for handling global Storyteller events, such as user activities, ad requests, navigation actions, and providing custom UI for certain SDK features. An implementation of this delegate can be set on the Storyteller.storytellerDelegate companion object property. For more information on using Storyteller delegates, see the Storyteller Delegates Documentation.

Functions

Link copied to clipboard
abstract fun bottomSheetScreen(urlProvider: () -> String, onDismiss: () -> Unit): @Composable () -> Unit

Allows providing a custom Composable screen to be displayed in a bottom sheet. This is typically invoked when a deep link includes a specific query parameter (shouldUseModal=true) indicating that content (often a WebView) should be presented in a modal fashion.

Link copied to clipboard
abstract fun categoryFollowActionTaken(category: StorytellerCategory, isFollowing: Boolean)

Invoked when a user explicitly follows or unfollows a category from within the SDK's UI. For more details on delegate callbacks, see the Storyteller Delegates Documentation.

Link copied to clipboard
abstract fun configureWebView(view: WebView, url: String?, favicon: Bitmap?)

Allows custom configuration of a WebView instance that the Storyteller SDK is about to display. This can be used to inject custom JavaScript, set WebView settings, or attach custom WebViewClients/WebChromeClients. See also Additional SDK Methods.

Link copied to clipboard

Allows providing a custom Composable screen for displaying the content of a followable category. This method is called when a user navigates to a followable category and the corresponding Storyteller.useCustomScreenForCategory lambda returns true for that category.

Link copied to clipboard
abstract fun getAd(adRequestInfo: StorytellerAdRequestInfo, onComplete: (StorytellerAd) -> Unit = {}, onError: () -> Unit)

This method does not need to be implemented unless there is specific use case. For Ads Support use Storyteller Gam Module.

Link copied to clipboard

Called when a user activity event is triggered within the SDK (e.g., opening a Story, viewing a page). This provides an opportunity for the client application to consume these analytics events.

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

Called when a user taps on an action button within a Story page that is configured to navigate to a specific location within the integrating application. It handles deep link type actions which can be set in CMS. For more information on handling navigation to your app, see the Navigating to Your App Documentation.