Additional Methods

Table of Contents

  1. Static Attributes
  2. Static Methods

This page covers additional helper methods and properties.

Setting Global StorytellerDelegate

Please see the dedicated StorytellerDelegate page.

    Storyteller.storytellerDelegate = myCustomStorytellerDelegate

Static Attributes

isInitialized

isInitialized is a boolean static property which is set to true if Storyteller was initialized successfully.

val initialized = Storyteller.isInitialized

isPlayerVisible

isPlayerVisible is a boolean property which is set to true when a Story or Clip player is opened, false when the Story or Clip player is dismissed.

val isStoryPlayerVisible = Storyteller.isPlayerVisible

version

The version is a static String property which holds the SDK version.

val storytellerVersion = Storyteller.version

Static Methods

isStorytellerDeepLink(String) checks if the string is a valid Storyteller deep link. For more information on deep linking, see the dedicated Deep Linking page

Storyteller.isStorytellerDeepLink("stories://open/9329bed2-2311-69b8-cbcf-39fcf8d8af21/f6445df7-bd79-71de-cdfb-39fd071568a1")

dismissPlayer

dismissPlayer(Boolean, String?): force closes the currently open Story or Player Views. If no Player is open when this is called, it has no effect.

animated: the flag indicating if close animation should be triggered. Defaults to true.

reason: the reason why the Story Page was force closed. This will be used to populate the dismissedReason parameter of the corresponding onUserActivityOccurred callback. If this is set to null the onUserActivityOccurred callback will not be triggered.

Storyteller.dismissPlayer(true, "reason")

enableEventTracking/disableEventTracking

The disableEventTracking() method will disable storing analytics events on Storyteller servers. By default, event tracking is enabled. Note that some events are necessary for user functionality and will still be made (but not stored) when event tracking is disabled.

Event tracking can be enabled again by calling enableEventTracking()

Example:

    Storyteller.enableEventTracking()
    Storyteller.disableEventTracking()
PREVIOUS
Forward Arrow