Eynora LMS SDK
The Eynora LMS SDK enables any Android application to embed the full LMS experience — courses, chapters, live classes, assignments, and video playback — through a simple integration. Branding, API base URL, and theme are resolved automatically from the tenant validation API at runtime using your clientKey.
Table of Contents
Overview
The SDK handles the full LMS lifecycle internally:
- The host app supplies tenant credentials and student details via
LmsSdkConfig - The SDK initialises its internal dependency graph
- Brand color, logo, base URL, and theme are fetched from the tenant validation API using
clientKey - The SDK performs a server-side SDK Login using the student's mobile number — no OTP or password required
- The full LMS home screen is presented to the student
Note: Branding and API configuration are managed server-side per tenant. The host app only needs to provide
TenantDetailandStudentDetail.
Android Integration
Requirements
Requirement | Minimum |
|---|---|
Android SDK | API 23 (Android 6.0) |
Compile SDK | API 34 |
Java | 11 |
Kotlin | 1.9+ |
Gradle | 8.0+ |
Installation
Step 1 — Add your GitLab token to Gradle properties
In ~/.gradle/gradle.properties (create the file if it doesn't exist):
gitlabToken=YOUR_GITLAB_PERSONAL_ACCESS_TOKENCreate a Personal Access Token at https://gitlab.eynora.tech/-/user_settings/personal_access_tokens with the api scope. This file is on your local machine only — never commit it to git.
Step 2 — Add the GitLab Maven registry to your repositories
In settings.gradle.kts:
dependencyResolutionManagement { repositories { maven { url = uri("https://gitlab.eynora.tech/api/v4/projects/4/packages/maven") credentials(HttpHeaderCredentials::class) { name = "Private-Token" value = providers.gradleProperty("gitlabToken").get() } authentication { create<HttpHeaderAuthentication>("header") } } google() mavenCentral() }}Step 3 — Add the dependency
In your app-level build.gradle.kts:
dependencies { implementation("com.dn:lms-sdk:1.0.0") coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")}android { compileOptions { isCoreLibraryDesugaringEnabled = true sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 }}Step 4 — Register the SDK Activity
In AndroidManifest.xml, inside <application>:
<activity android:name="com.dn.lmssdk.android.LmsSdkActivity" android:exported="false" android:theme="@style/Theme.AppCompat.NoActionBar" tools:replace="android:theme" />Important: tools:replace="android:theme" is required to prevent manifest merge conflicts with the host app's default theme.
Configuration
Create an LmsSdkConfig with your tenant and student details. The recommended place is your Application subclass:
MyApplication.kt
import android.app.Applicationimport com.dn.lmssdk.LmsSdkimport com.dn.lmssdk.LmsSdkConfigimport com.dn.lmssdk.TenantDetailimport com.dn.lmssdk.StudentDetailclass MyApplication : Application() { override fun onCreate() { super.onCreate() LmsSdk.configure( LmsSdkConfig( tenantDetail = TenantDetail( tenantId = "YOUR_TENANT_ID", clientKey = "YOUR_CLIENT_KEY" ), studentDetail = StudentDetail( name = "Student Name", mobileNo = "9800000000", username = "student.username", gradeCode = "GRADE_10" ) ) ) }}Register it in AndroidManifest.xml:
<application android:name=".MyApplication" ... >Launching the SDK
After configuring, launch the LMS from any Activity:
import com.dn.lmssdk.android.LmsSdkActivityLmsSdkActivity.launch(this)The full LMS opens as a new full-screen activity.
Authentication Flow
Host App │ ├── LmsSdk.configure(config) ← call once in Application.onCreate() │ └── LmsSdkActivity.launch(context) ← call on button tap │ ├── 1. Koin DI graph initialised ├── 2. Tenant validation API called → brand, logo, base URL resolved ├── 3. SDK Login called with studentDetail.mobileNo │ └── Server issues JWT (no OTP required) └── 4. LMS Home screen presentedError Handling
Scenario | SDK Behaviour |
|---|---|
Invalid tenantId or clientKey | Error screen shown; LMS does not open |
Tenant validation API unreachable | Splash screen shown; network error with retry |
SDK Login fails (student not found) | Auth screen shown; student can log in manually |
No internet connection | Error screen with retry button |
Configuration Reference
LmsSdkConfig
Field | Type | Required | Description |
|---|---|---|---|
tenantDetail | TenantDetail | Yes | Tenant identity — used to resolve brand and API config |
studentDetail | StudentDetail | Yes | Student identity — used for SDK Login |
TenantDetail
Field | Type | Description |
|---|---|---|
tenantId | String | Your tenant's unique identifier |
clientKey | String | Brand key — used to fetch branding from the tenant validation API |
StudentDetail
Field | Type | Description |
|---|---|---|
name | String | Student's display name |
mobileNo | String | Mobile number used for SDK Login |
username | String | Username — used as fallback if mobileNo is blank |
gradeCode | String | Grade/class code for content gating |
Test Credentials
Use the following credentials to test the integration against the staging environment.
Field | Value |
|---|---|
Tenant ID | Provided by Eynora team |
Client Key | Provided by Eynora team |
Mobile No | Provided by Eynora team |
Grade Code | Provided by Eynora team |
Contact the Eynora team at dev@eynora.tech to obtain staging credentials for your integration.