Kotlin
Setting up authentication
In order to connect to an Vonage Video session, the client will need access to some authentication credentials — an APP ID, session ID, and token. In a production application, these credentials should be generated using a Server SDKs, but to speed things up we will hard code the values for now:
- Create a new Kotlin file named
VonageVideoConfig.ktand add the following object:
object VonageVideoConfig {
// Replace with your Vonage Video APP ID
const val APP_ID = ""
// Replace with your generated session ID
const val SESSION_ID = ""
// Replace with your generated token
const val TOKEN = ""
}
- Adjust the code by hard coding the values for the
APP_ID,SESSION_IDandTOKEN. You can obtain them by following the instructions below:
- Sign up for or Log into your account.
- In the left-side menu of the dashboard, click
Applicationsand select a previous application or create a new one to view the Application ID.
- Make sure that Video is activated
- Head over to the The Video API Playground. Either enter the Application ID or find it in the dropdown. You can leave the default values for the other options. Click "Create".
- Your Session ID and Token will be created.
Important: You can continue to get the session ID and token values from your Account during testing and development, but before you go into production you must set up a server.
For more information on sessions, tokens, and servers, check out Video API Technical Details.
Basic video chat
Learn the basic concepts of the Vonage Video API platform, including how users can communicate through video, voice, and messaging. Explore a basic Vonage Video API flow.
Steps
1
Introduction2
Getting Started3
Creating a new project4
Adding the Android SDK5
Setting up authentication6
Requesting permissions7
Connecting to the session8
Adjusting the sample app UI9
Publishing a stream to the session10
Subscribing to other client streams11
Running the app12
Conclusion