MomentsListener

interface MomentsListener

This listener represents the protocol which notifies application when an event occurs in Storyly Moments.

Functions

onLinkCTAPreviewURLClicked
Link copied to clipboard
open fun onLinkCTAPreviewURLClicked(url: String, showCustomLinkPreviewView: (View) -> Unit)

This function will let you know that a user clicked CTA Link preview on CTA editor. You can show your custom web view on this callback. You should set isCustomPreviewView to true in MomentsLinkCTAConfig in order to use this function

onPreModeration
Link copied to clipboard
open fun onPreModeration(preModerationList: List<PreModeration?>, onCompletion: () -> Unit)

This function will notify your application in case trying to create a Text or CTA Link interactive.

onStoryCreatorClose
Link copied to clipboard
open fun onStoryCreatorClose()

This function will notify you when user closes the Story creator.

onStoryCreatorOpen
Link copied to clipboard
open fun onStoryCreatorOpen()

This function will notify you when user opens the media gallery to create a Moments story or when user is directed to upload screen with imported media

onUserActionClicked
Link copied to clipboard
abstract fun onUserActionClicked(story: MomentsStory)

This function will notify your application in case CTA action.

onUserStoriesClose
Link copied to clipboard
open fun onUserStoriesClose()

This function will notify you when user closes the preview of own stories

onUserStoriesLoaded
Link copied to clipboard
open fun onUserStoriesLoaded(momentsStoryGroup: MomentsStoryGroup?)

This function will notify you when user stories are loaded

onUserStoriesLoadFailed
Link copied to clipboard
open fun onUserStoriesLoadFailed(errorMessage: String)

This function will notify you when loading of user stories is failed

onUserStoriesOpen
Link copied to clipboard
open fun onUserStoriesOpen()

This function will notify you when user wants to preview own stories

storyAnalyticsClicked
Link copied to clipboard
open fun storyAnalyticsClicked(momentsStory: MomentsStory?, stats: MomentsAnalytics?, analyticsType: AnalyticsType, showCustomAnalyticsView: (View) -> Unit)

This function will let you know that a user clicked an analytic button of a Storyly Moments story. You can show your custom view on this callback for impressions and likes. You should set isCustomAnalyticsView to true in MomentsThemeConfig in order to use this function

storyHeaderClicked
Link copied to clipboard
open fun storyHeaderClicked(momentsStoryGroup: MomentsStoryGroup?, story: MomentsStory?)

This function will let you know that a user clicked header icon of a Storyly Moments story

storylyMomentsEvent
Link copied to clipboard
open fun storylyMomentsEvent(event: StorylyMomentsEvent, momentsStoryGroup: MomentsStoryGroup?, stories: List<MomentsStory>?)

This function will notify you about all Storyly Moments events and let you to send these events to specific data platforms