Open Player#
Showcase examples#
Open Stories#
This call opens a Story with a given ID. The call will only open that individual Story.
fun openStory(activity: Activity, storyId: String? = null, onError: (StorytellerError) -> Unit = {})
Parameters:
activity- this is the Activity that will be used to launch the Storyteller PlayerstoryId- this is a Story's ID, if it isnullthenonErrorwill be calledonError- this is called when there is an issue with opening a Story (e.g. the requested content is no longer available)
Open Pages#
This call opens a Page with a given ID. The call will only open that individual Story containing that page.
fun openPage(activity: Activity, pageId: String? = null, onError: (StorytellerError) -> Unit = {})
Parameters:
activity- this is the Activity that will be used to launch the Storyteller PlayerpageId- this is a Page's ID, if it isnullthenonErrorwill be calledonError- this is called when there is an issue with opening a Story (e.g. the requested content is no longer available)
Open Collection#
fun openCollection(
activity: Activity,
configuration: StorytellerClipCollectionConfiguration,
titleDrawable: Drawable? = null,
onError: (StorytellerError) -> Unit = {}
)
Parameters:
activity- this is the Activity that will be used to launch the Storyteller Playerconfiguration- this is a Clip Collection configuration, see belowtitleDrawable- this is a Drawable that will be used as the title of the Player (optional)onError- this is called when there is an issue with opening the Collection (e.g. the requested Collection is not available)
StorytellerClipCollectionConfiguration parameters:
collectionId- this is a Clip Collection's ID (required)categoryId- this is a Category ID (optional), if provided, this category will be opened, if the category is not available or not found it will be ignoredclipId- this is a Clip ID to open (optional)
Open Category#
This call opens a Story category. If Story ID is not supplied, the first Story in the collection will be opened.
fun openCategory(
activity: Activity,
category: String,
storyId: String? = null,
onError: (StorytellerError) -> Unit = {}
)
Parameters:
activity- this is the Activity that will be used to launch the Storyteller Playercategory- this is a Story categorystoryId- this is a Story ID (optional)onError- this is called when there is an issue with opening the Category (e.g. the requested Category is not available)
openStoryByExternalId#
This call opens a Story by external ID.
fun openStoryByExternalId(
context: Activity,
externalId: String? = null,
onError: (StorytellerError) -> Unit = {}
)
Parameters:
activity- this is the Activity that will be used to launch the Storyteller PlayerexternalId- external Id to open a StoryonError- this is called when there is an issue with opening the Category (e.g. the requested Category is not available)
openCollectionByExternalId#
This call opens a Collection of Clips and shows Clip with external id. If Clip ID is not supplied, the first Clip in the collection will be opened.
fun openCollectionByExternalId(
activity: Activity,
collectionId: String,
externalId: String? = null,
titleDrawable: Drawable? = null,
onError: (StorytellerError) -> Unit = {}
)
Parameters:
activity- this is the Activity that will be used to launch the Storyteller PlayercollectionId- this is a Clip Collection's IDexternalId- this is a Clip's external ID (optional)titleDrawable- this is a Drawable that will be used as the title of the Player (optional)onError- this is called when there is an issue with opening the Collection (e.g. the requested Collection is not available)