Installation

Before writing any code, complete the following setup steps: download the SDK and UI Kit AAR files, configure Gradle, and define the required Android permissions. This page walks through each step in order.

Step 1 — Download Required Files

The Android UI Kit depends on both the EnableX Android SDK (the underlying media engine) and the UI Kit AAR itself. You need both files.

  1. Download the latest Android SDK AAR from the Downloads page.
  2. Download the latest Android UI Kit: Enx_UIKit_Android-2.2.1.zip
  3. Extract the zip and add both .aar files to the libs/ folder of your Android app module. If the folder does not exist, create it at app/libs/.
AAR Files in libs/

Placing AAR files in the libs/ folder is the standard approach for local library dependencies in Android. The Gradle configuration in Step 2 points to this folder automatically.

Step 2 — Configure Gradle

In your app-level build.gradle (inside the app/ module), add the following dependencies. The fileTree line pulls in all AAR and JAR files from libs/, and the Socket.IO client provides the signalling layer required by the SDK.

implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
implementation('io.socket:socket.io-client:2.1.2') {
    exclude group: 'org.json', module: 'json'
}
Why exclude org.json?

The org.json module is bundled with Android. Excluding it from the Socket.IO client dependency prevents a duplicate class conflict at build time.

Step 3 — Define Permissions

The UI Kit requires camera, microphone, network, storage, and Bluetooth permissions to function correctly. Add the following entries to your app's AndroidManifest.xml, inside the <manifest> element and above the <application> block:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH"
    android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
    android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
    android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
Bluetooth Permissions on Android 12+

BLUETOOTH and BLUETOOTH_ADMIN are capped at maxSdkVersion="30" (Android 11). On Android 12 (API 31) and above, the newer BLUETOOTH_SCAN, BLUETOOTH_ADVERTISE, and BLUETOOTH_CONNECT permissions apply instead. Declaring all three sets ensures correct behavior across all supported Android versions.

Step 4 — Obtain a Token

Before a user can join a video session, your app needs a valid EnableX room token. The token is issued by your app server and carries the joining user's role — participant, moderator, or viewer. The UI Kit reads the role from the token and automatically shows or hides the appropriate controls.

To obtain a token:

  1. Create a room using the EnableX Video REST API from your server.
  2. Create a token for the user, specifying their role.
  3. Pass the token securely to your Android app (for example, via your own API).
  4. Provide the token string to EnxVideoView at initialization time.

See the Video API Reference for the complete room and token creation API.

Never Generate Tokens in Client-Side Code

Your EnableX App ID and App Key must never be embedded in your Android app. Always call the EnableX API from your server and pass the resulting token securely to your app at runtime.