Skip to content


Use Gradle:

repositories {
  maven { url '' }

dependencies {
  implementation ''

tag is a current version of library

Integration guide

First put the wistory view in your layout xml:


Add your company token into manifest :

    android:value="YOUR_TOKEN" />

Optional: Add server url into manifest for standalone Wistory version. Skip this step for default installation.

    android:value="YOUR_SERVER_URL" />

And initialize library in application class:

class App : Application() {

    override fun onCreate() {

If you need open story by event, use this function:

Wistory.openStory(requireContext(), eventId)


You can customize wistory view

by xml:

  • format can be fixed or fullscreen

  • statusBarAlignment can be at top or at bottom

or by code using Kotlin DSL:

storiesView {
    config {
        format = UiConfig.Format.FIXED
        statusBarPosition = UiConfig.VerticalAlignment.BOTTOM

Event listener

Wistory provides handlers for most of common cases. The listener can also be added using Kotlin DSL:

storiesView {
    eventListener = this@MainActivity


  • fun onItemsLoaded()

Called if the stories are successfully downloaded from the server

  • fun onRead(storyId: String)

It's called when story was readen. Passes the story object

  • fun onPrevSnap(storyId: String)

Called when switching to the previous "snap". Passes the story object

  • fun onNextSnap(storyId: String)

Called when switching to the next "snap". Passes the story object

  • fun onNavigate(action: String, value: String)

Called up by pressing the action button. Passes the action type and value

  • fun onFavorite(id: String, isFavorite: Boolean)

Called up by clicking the add to favorites button. Passes id of story and value

  • fun onRelation(id: String, relation: String)

Called up by pressing the like or dislike button. Passes id of story and value

  • fun onPoll(storyId: String, sheet: Int, newpoll: String? = null, oldpoll: String? = null)

Called up after the answer choice is made in the voting. Passes the story, "snap" position and the answer choice id

  • fun onError(e: Exception)

Called on any error. Mostly by network layer


Shield: CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0