OpenTok Android SDK

The OpenTok Android SDK 2.2 lets you use OpenTok-powered video sessions in apps you build for Android devices.

Apps written with the OpenTok Android SDK 2.2 can interact with OpenTok apps written with the following OpenTok SDKs:

Installation

The library binaries are included in the OpenTok/libs subdirectory of the SDK.

Developer and client requirements

The OpenTok Android SDK 2.2 is expected to work with Android 4.0+ and devices from Samsung, Google Nexus, Motorola Moto, and LG Optimus families. The OpenTok Android SDK 2.2 also works on x86 devices. If you are targeting a different OS version or device family, then please contact us at support@tokbox.com.

Using the sample apps

The samples directory of the SDK contains the OpenTokSamples app. This app shows the most basic functionality of the OpenTok Android SDK: connecting to sessions, publishing streams, and subscribing to streams. It also shows how to add UI controls to publisher and subscriber views, how to use custom video capturer and renderers, how to send and receive messages in the session, and how to respond to archiving events.

The samples are also available at the opentok-android-sdk-samples repo at github.

For more information, see the README file in the samples directory.

Creating your own app using the OpenTok Android SDK

Add the following libraries to your project's build path:

  • opentok-android-sdk-2.2.jar
  • armeabi/libopentok.so

These are included in the OpenTok/libs subdirectory of the SDK. (From the desktop, drag the opentok-android-sdk-2.2.jar file and armeabi directory into the libs directory of your project in the ADT package explorer.)

Also, you need to add the following permissions and features to your app manifest:

  • android.permission.CAMERA
  • android.permission.INTERNET
  • android.permission.RECORD_AUDIO
  • android.permission.WAKE_LOCK
  • android.permission.MODIFY_AUDIO_SETTINGS
  • android.hardware.camera
  • android.hardware.camera.autofocus

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.

Documentation

Reference documentation is available in the docs subdirectory of the SDK and at http://www.tokbox.com/opentok/libraries/client/android/reference/index.html.

More information

For a list of new features and known issues, see the release notes.

IRC Live Chat

Have a quick question? Chat with TokBox Support on IRC. Join chat

Was this page helpful? Yes No