# Quick Start

This walkthrough shows how to add Storyly to your Android application and show your first story in it.

You can also check out the demo on GitHub

Storyly Demo for Kotlin (opens new window)

Storyly Demo for Java (opens new window)

Before you begin

This walkthrough contains sample instance information. However, if you want to work with your own content as well, please login into Storyly Dashboard (opens new window) and get your instance token.

The sample instance information for testing purposes;


# Installation

First, declare the dependency for the Storyly SDK in your app’s module Gradle file (usually app/build.gradle).


android {
    dependencies {
        // You should add this line
        implementation 'com.appsamurai.storyly:storyly:<latest-version>'


Please do not forget to replace <latest-version>. The latest version is Download (opens new window).


Storyly SDK targets Android API level 17 (Android 4.2, Jelly Bean) or higher.


Please note that if you want to use the Interactive VOD feature, you need to add Java 1.8 compatibility configuration as well. In your app’s module Gradle file (usually app/build.gradle), please add the following instructions:


android {
    compileOptions {
        // You should add these two lines
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8


If your application targets devices that does not contain Google APIs, you need to initialize EmojiCompat (opens new window) class to use Emoji related features of Storyly such as Emoji and Rating Components. Otherwise, you will encounter a crash whenever you use any of these components in your Storyly instance.

Please follow Emoji Compat Bundled Fonts initialization steps (opens new window) to use Emoji features of Storyly.

# Add Storyly View

You can add StorylyView to your app either from XML layout or using the programmatic approach.

StorylyView extends ViewGroup so that you can use inherited functionality as it is. So, you can add StorylyView to any of the app’s layouts as a View component.

# Adding from XML Layout

Open your XML layout and add these lines wherever you want to add StorylyView

    android:layout_height="wrap_content" />

# Programmatically

StorylyView extends ViewGroup so that you can use inherited functionality as it is. So, you can initialize StorylyView using View’s constructors.

    # Initialize StorylyView

    You are one step away from enjoying Storyly. You just need to initialize StorylyView.


      Please do not forget to use your own token. You can get your token from the Storyly Dashboard -> Settings -> App Settings (opens new window)

      Just hit the run. Now, you should be able to enjoy Storyly 🎉!


      If you can't see Storyly in your application, please check that your token is correct. For more details please check console logs.