Android Toolkit

The Android Toolkit is used to integrate Real Time Communication using EnableX Platform into native android application. This toolkit exposes functions, methods, notifications required to communicate with EnableX platform. You need a valid token to carry out a RTC Session. To create token visit here.

The library is provided as EnxRtcAndroid-release_1.3.1.aar file. Place the enx-android-sdk-0.9.aar file into your project in Android Studio. Modify the gradle file for your project to reference the EnxRtcAndroid-release_1.3.1.aar file.

By using Android Archive Library (.aar)

Edit the build.gradle for your project (at your project's root) and add the following code snippet to the allprojects/repositories section:


flatDir {     dirs 'src/main/libs' }

Modify build.gradle for your module (the app/build.gradle file) and add the following code snippet to the dependencies section:


implementation 'org.webrtc:google-webrtc:1.0.25331' implementation('io.socket:socket.io-client:1.0.0') {     // excluding org.json which is provided by Android     exclude group: 'org.json', module: 'json' } implementation (name:'EnxRtcAndroid-release_1.3.1', ext:'aar')

By using Maven Dependency

A Maven version is also available. Modify your app gradle to download the enablex android sdk. For example:

1. Edit the build.gradle for your project and add the following code snippet to the allprojects/repositories section: maven { url "https://dl.bintray.com/enablex/maven"} 2. Modify build.gradle for your module and add the following code snippet to the 'dependencies' section: compile 'com.enxrtc:Enx-Rtc-Android:1.3.1'

Permissions

Need to define Permissions in AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

Features


Need to define featurs in AndroidManifest.xml
<uses-feature android:name="android.hardware.camera"/> <uses-feature android:name="android.hardware.camera.autofocus"/> <uses-feature android:glEsVersion="0x00020000" android:required="true"/>

Classes in the Toolkit

The Android Toolkit exposes the following classes:

EnxRtc

The API is used in the client endpoint to connect to room (conference room) hosted on Enablx Server to carry out Real Time Communication Session.
> More...

EnxRoom

EnxRoom class expose room level features and controls. To start a session one has to initialize the room instance and able to connect with call.
> More...

EnxStream

EnxStream class provide video stream features and controls.
> More...