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.
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.
- Download the latest Android SDK AAR from the Downloads page.
- Download the latest Android UI Kit: Enx_UIKit_Android-2.2.1.zip
-
Extract the zip and add both
.aarfiles to thelibs/folder of your Android app module. If the folder does not exist, create it atapp/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.
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'
}
The org.json module is bundled with Android. Excluding it from the
Socket.IO client dependency prevents a duplicate class conflict at build time.
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 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.
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:
- Create a room using the EnableX Video REST API from your server.
- Create a token for the user, specifying their role.
- Pass the token securely to your Android app (for example, via your own API).
- Provide the token string to
EnxVideoViewat initialization time.
See the Video API Reference for the complete room and token creation API.
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.