Android SDK

Android (Jetpack Compose) SDK for Digia Engage. Renders CEP nudges (bottom sheets, dialogs) and inline content (banners, cards) designed in Digia Studio, triggered by your CEP tool.

Artifact: com.github.Digia-Technology-Private-Limited:digia_engage Version: android.1.0.0-beta.2 Repository: JitPackarrow-up-right Min SDK: 21 Compile SDK: 34 Language: Kotlin + Jetpack Compose


Installation

1. Add JitPack repository

In your root settings.gradle.kts:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://jitpack.io") }
    }
}

2. Add dependency

// build.gradle.kts (app module)
dependencies {
    implementation("com.github.Digia-Technology-Private-Limited:digia_engage:android.1.0.0-beta.2")
}

Get Your API Key

  1. Open your project.

  2. Go to SettingsApp Settings.

  3. Copy your API Key.


Initialization

Call Digia.initialize once at application startup, in your Application.onCreate():

Register your Application class in AndroidManifest.xml:

DigiaConfig Parameters

Parameter
Type
Default
Description

apiKey

String

required

API key from the Digia dashboard.

environment

DigiaEnvironment

PRODUCTION

PRODUCTION or SANDBOX.

logLevel

DigiaLogLevel

ERROR

NONE, ERROR, or VERBOSE.


Set Up DigiaHost

Wrap your app's root composable with DigiaHost. It listens for incoming campaign payloads and renders overlay experiences (bottom sheets, dialogs) above all content.

Place DigiaHost only once, wrapping your root composable. Nesting multiple DigiaHost instances produces undefined behaviour.


DigiaHost — Nudges (Bottom Sheets & Dialogs)

DigiaHost handles SHOW_BOTTOM_SHEET and SHOW_DIALOG campaign payloads automatically. No additional code is needed beyond the setup above — campaigns are rendered when triggered by the connected CEP tool.


DigiaSlot — Inline Content (Banners & Cards)

Place DigiaSlot composables wherever you want inline campaign content (banners, offer cards) to appear. The placementKey must match the placement ID configured in the Digia dashboard.

Behaviour:

  • Renders nothing when no campaign is active for the placement.

  • Fires an impression event the first time each unique payload renders.

  • Content persists across recomposition — cleared only by server invalidation or user dismissal.


Screen Tracking

Call Digia.setCurrentScreen when the user navigates to a new screen. The registered CEP plugin uses this for screen-based campaign trigger rules.


Next Steps

Last updated