Skip to main content
Version: 3.x.x

Experience data

Android SDK 3 represents content returned by a widget with StorifyMeExperience. The SDK creates these objects and provides them through callbacks; applications cannot construct them directly.

Public properties​

PropertyTypeDescription
idLongExperience identifier.
widgetIdLongID of the widget that returned this experience.
typeStorifyMeExperienceTypeContent kind.
nameString?Configured display title, if present.
handleString?URL-safe experience handle, if present.
tagsList<String>Tags assigned to the experience.
navigationUrlString?Configured web URL or app link.
totalDurationDouble?Total duration in seconds, when applicable.
isSeenBooleanWhether the user has seen the experience.
thumbnailUrlString?Best available poster URL, falling back from thumbnail to resized and original poster.
adInfoStorifyMeAdInfo?Ad source and payload for ad experiences; null otherwise.

deeplink is a deprecated alias for navigationUrl. Use navigationUrl in new code. The SDK keeps internal state such as live status and seen timestamps out of the public model.

Content types​

when (experience.type) {
StorifyMeExperienceType.STORY -> showStory(experience)
StorifyMeExperienceType.SHORTS -> showShort(experience)
StorifyMeExperienceType.SNAP -> showSnap(experience)
StorifyMeExperienceType.AD -> showAd(experience)
StorifyMeExperienceType.UNKNOWN -> Unit
}
  • STORY: standard multi-page story.
  • SHORTS: short-form video experience. SHORT is a deprecated alias; use SHORTS.
  • SNAP: snap content.
  • AD: ad experience; inspect adInfo when you need ad-specific details.
  • UNKNOWN: unrecognized type; keep a fallback for forward compatibility.

Example: preview and navigation​

widget.widgetListener = object : StorifyMeWidgetListener {
override fun onLoaded(widgetId: Long, experiences: List<StorifyMeExperience>) {
val previews = experiences.map { experience ->
ExperiencePreview(
id = experience.id,
title = experience.name.orEmpty(),
imageUrl = experience.thumbnailUrl,
seen = experience.isSeen,
)
}
showPreviews(previews)
}
}

widget.experienceListener = object : StorifyMeExperienceListener {
override fun onNavigationRequested(
experience: StorifyMeExperience,
completion: (StorifyMeExperienceNavigationDecision) -> Unit,
) {
val url = experience.navigationUrl
if (url != null && appRouter.canHandle(url)) {
appRouter.open(url)
completion(StorifyMeExperienceNavigationDecision.HANDLE_NAVIGATION)
} else {
completion(StorifyMeExperienceNavigationDecision.OPEN_EXPERIENCE)
}
}
}

See Events for listener setup and callback behavior.