Deeplinks
Use from a CTA in a story
If you want to add deep link logic from a story, you can implement the onContentLinkClick method from JOINStoriesListener.
This event tells you that a user has clicked on a CTA in the player. It indicates the CTA link in parameters and you can customize the behaviour based on this link (deeplink, path, https, etc...).
The method should return true if the app manages the link click behaviour, and false if the app does not want to catch the link provided. If a false is returned, the SDK will try to open the link in the default browser of the device. By default, the method return false.
fun onContentLinkClick(link: String): Boolean {
return false
}
Opening an story from a deep link
If you want to open an story from an external deep link (like notification, in-app event, ...), you can use the standalone player to display it.
The deep link must include the alias corresponding to the widget in order to display the story.
Example:
val deeplink = "app://myView/0/story/story-alias" // It's an example of deep link
val storyAlias = getAlias(deeplink)
JOINStories.startPlayer(storyAlias)
Updated 7 months ago