SDK

This page provides information how to integrate native Android or iOS SDK into your mobile app.

Android

Step 1

Add this line to build.gradle (app level)

dependencies {
// .. Your other dependencies
implementation("io.enabl3.android.enabl3androidsdk:Enabl3AndroidSDK:1.0.9")
}

Step 2

Add this to build.gradle (Project level) or settings.gradle (based on your configuration)

repositories {
    // Other repositories like google() or mavenCentral()
    maven {
        url = uri("https://gitlab.com/api/v4/projects/53763719/packages/maven")
        credentials(HttpHeaderCredentials::class) {
            name = "Private-Token"
            value = "xxx"
        }
        authentication {
            create<HttpHeaderAuthentication>("header")
        }
    }
}

You can find your personal repository private-token in your Admin panel, section Home.

Step 3

Init Enabl3 in your Application class or Activity class

Enabl3.init(context, "insert_user_token_here")

To get user_token your backend need to call GET JWT endpoint and send it into your app.

Step 4

To open Enabl3 you should call

Enabl3.open(context, StartAnimation.SlideFromLeft)

You can call this code from button onClickListener etc. Pass context and animation type if you need smooth opening. Available animation types:

sealed class StartAnimation {
    data object SlideFromLeft : StartAnimation()
    data object SlideFromRight : StartAnimation()
    data object SlideFromTop : StartAnimation()
    data object SlideFromBottom : StartAnimation()
    data object None : StartAnimation()
}

iOs

Documentation coming soon

Last updated