

- #REAL SIMPLE ANDROID APP FOR ANDROID#
- #REAL SIMPLE ANDROID APP CODE#
- #REAL SIMPLE ANDROID APP TRIAL#
Important: You can continue to get the session ID and token Use the project’s API key along with the session ID and token you generated. From there, you can generate a session ID and To do this, log into your TokBox Account, either createĪ new OpenTok API project or use an existing OpenTok API project, then go to your project page and scroll down to
#REAL SIMPLE ANDROID APP CODE#
Public static final String SESSION_ID = "" Īdjust the code by hard coding the values for the API_KEY, SESSION_ID and TOKEN.

We'll also add some constants for our log message identifier and permissions: To speed things up we will just hard code the values for now:Ĭreate the OpenTokConfig class (File | New | Java Class), add some static variables to store the API key, session ID, and token. These credentials should be generated by a server, but In order to connect to an OpenTok session, the client will need access to some authenticationĬredentials - an API key, session ID, and token. Implementation ':opentok-android-sdk:2.22.2'ĪndroidTestImplementation 'androidx.test:runner:1.2.0'ĪndroidTestImplementation ':espresso-core:3.2.0' Implementation 'androidx.annotation:annotation:1.1.0' Implementation 'nstraintlayout:constraintlayout:1.1.3' Implementation 'androidx.appcompat:appcompat:1.0.2' Implementation fileTree( dir: 'libs', include: ) ProguardFiles getDefaultProguardFile( 'proguard-android-optimize.txt'), 'proguard-rules.pro' TargetCompatibility JavaVersion.VERSION_1_8Īt this point the adle file for your module should look like this: apply plugin: ''ĪpplicationId "" SourceCompatibility JavaVersion.VERSION_1_8 The app uses Maven to load the OpenTok Android SDK:Įdit the adle for your project (at your project's root) and add the following code snippet to the

Leave the Activity Name set to MainActivity, and leave the Layout Name set to Set the minimum SDK for the app to be API 16 (Android 4.1, Jelly Bean).Ĭlick through the wizard, ensuring that Empty Activity is selected. Open Android Studio and select New Project from the File menu.
#REAL SIMPLE ANDROID APP TRIAL#
A valid TokBox account - if you don't have one, you can sign up for a free trial.The repo includes a README with documentation for running and exploring the code.Īlso, this tutorial discusses the Java version of the Android sample app. Want to skip this tutorial? You can jump to the completed Android client code in the Basic-Video-Chat-Java folder of our Android sample app repo on Step 8: Subscribing to other client streams.Step 7: Publishing a stream to the session.Here are the items that will be covered in this tutorial:
#REAL SIMPLE ANDROID APP FOR ANDROID#
In this tutorial, you will be utilizing the OpenTok Android SDK, OpenTok's client-side library for Android devices, to quickly and easily build a real-time interactive video application. For more information on clients, servers, and sessions, see Video API Basics. In an end-user’s device (phone, computer) and handles the majority of OpenTok functionality, including All applications that use the Vonage Video API require both a client andĪ server component.
