The OpenTok Android SDK lets you use OpenTok-powered video sessions in apps you build for Android devices.
Apps written with the OpenTok Android SDK 2.7.0 can interoperate with OpenTok apps written with the following OpenTok SDKs:
The library binaries are included in the OpenTok/libs subdirectory of the SDK.
The OpenTok Android SDK supports one published audio-video stream, one subscribed audio-video stream, and up to five additional subscribed audio-only streams simultaneously (this is the baseline support on a Samsung Galaxy S3). To connect more than two clients in a session using the OpenTok Android SDK, create a session that uses the OpenTok Media Router (a session with the media mode set to routed). See The OpenTok Media Router and media modes.
The SDK is supported on high-speed Wi-Fi and 4G LTE networks.
The OpenTok Android SDK is expected to work with Android 4.0+ and devices from Samsung, Google Nexus, Motorola Moto, and LG Optimus families. The OpenTok Android SDK also works on x86 devices.
For sample code, go to the opentok-android-sdk-samples repo at GitHub.
To target ARM, add the following libraries to your project's build path:
To target x86, add the following libraries to your project's build path:
To target armeabi, armeabi-v7a, and x86, add the following libraries to your project's build path:
These are included in the OpenTok/libs subdirectory of the SDK. Copy the opentok-android-sdk-2.7.0.jar file into the 'libs' directory of your project in Android Studio. Then, add the armeabi directory, the x86/libopentok.so, or both into the 'jniLibs' directory of your project in Android Studio.
Also, you need to add the following permissions and features to your app manifest:
Your app needs to use a session ID and token generated with your OpenTok API key, which you can get at the OpenTok developer dashboard.
For test purposes, you can generate a session ID and token on the projects page of the OpenTok developer dashboard. For a production app, generate unique tokens (and session IDs, if you need to support multiple sessions) using the OpenTok server-side libraries.