Additional helper methods and properties.
StorytellerDelegate
Please see the dedicated StorytellerDelegate.
Storyteller.storytellerDelegate = myCustomStorytellerDelegate
dismissStoryView(Boolean, String?)
force closes the currently open story views. If no story view is open when this is called, it has no effect.
Parameters
-animated
: the flag indicating if close animation should be triggered. Defaults to true
.
-reason
: the reason why the story pager 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.dismissStoryView(true, "reason")
isInitialized
boolean static property which is set to true
if Storyteller was initialized successfully.
val initialized = Storyteller.isInitialized
version
static String property which holds the SDK version.
val storytellerVersion = Storyteller.version
isStorytellerDeepLink(String)
check if the string is a valid Storyteller deep link.
Storyteller.isStorytellerDeepLink("stories://open/9329bed2-2311-69b8-cbcf-39fcf8d8af21/f6445df7-bd79-71de-cdfb-39fd071568a1")
The openStory()
method opens a specific story by its id
parameter, a UUID identifier returned from the API. If id
is an empty string, invalid, or not specified the onFailure
callback will be called so your app can handle this error. The story is opened in the single story mode.
Parameters:
activity
: activitystoryId
: unique story idonError
: callback for an errorExample:
Storyteller.openStory(
activity = activity,
storyId = id
){ error -> //action to do on error
}
The openPage()
method opens a specific page by its id
parameter, a UUID identifier returned from the API. If id
is an empty string, invalid, or not specified the onFailure
callback will be called so your app can handle this error. The story is opened in the single story mode.
Parameters:
activity
: activitypageId
: unique page idonError
: callback for an errorExample:
Storyteller.openPage(
activity = activity,
pageId = id
){ error -> //action to do on error
}
The openDeepLink()
method opens a specific story or page. If the link is an empty string, or invalid the onFailure
callback will be called so your app can handle this error. The story is opened in the single story mode.
Parameters:
activity
: activitystorytellerDeepLink
: valid Storyteller deep linkonError
: callback for an errorExample:
Storyteller.openDeepLink(activity, storytellerDeepLink) { error ->
//action to do on error
}