Start or Join Meeting
After the successful installation of videoSDK, the next step is to integrate videoSDK features with your webApp/MobileApp.
To Communicate with other participant's audio or video call, you will need to join the meeting.
This guide will provide an overview of how to configure, initialize and join a VideoSDK meeting.

1. Configuration
To configure a meeting, you will need generated token and meetingId, we had discussed in Server Setup. This code snippet calls API from local server
Scenario 1 - Suppose you don't have any meetingId, you can simply generate meetingId by invoking create-meeting
API.
Scenario 2 - Suppose you have meetingId, now you don't have to call create-meeting
API to generate meetingId, instead you can call validate-meeting
API to validate meetingId.
Token generation API is necessary for both scenario.
note
You can take advantage of regional API to decrease latency in video calling.
To achieve region based meetings, just pass region : REGION_CODE
parameter in create-meeting
request Body.
Currently the below regions are supported:
sg001
Region Code for Singapore, SG.uk001
Region Code for London, UK.us001
Region Code for Fremont, CA.eu001
Region Code for Frankfurt, DE.
In case you are not providing any region code, the default region will be sg001
.
- Kotlin
- Java
package live.videosdk.rtc.android.java;
import com.androidnetworking.AndroidNetworking;
import com.androidnetworking.error.ANError;
import com.androidnetworking.interfaces.JSONObjectRequestListener;
import org.json.JSONException;
import org.json.JSONObject;
class JoinActivity : AppCompatActivity() {
private val apiServerUrl = "http://localhost:9000"
// ...
// onCreate() and other methods
private fun getToken(@Nullable meetingId: String?) {
AndroidNetworking
.get("$apiServerUrl/get-token")
.build()
.getAsJSONObject(
object : JSONObjectRequestListener {
override fun onResponse(response: JSONObject) {
try
{
token = response.getString("token")
if (meetingId == null) {
createMeeting(token)
} else {
joinMeeting(token, meetingId)
}
} catch (e: JSONException) {
e.printStackTrace()
}
}
override fun onError(anError: ANError) {
anError.printStackTrace()
}
}
)
}
private fun createMeeting(token: String) {
AndroidNetworking
.post("$apiServerUrl/create-meeting")
.addBodyParameter("token", token)
.addBodyParameter("region", "sg001")
.build()
.getAsJSONObject(
object : JSONObjectRequestListener {
override fun onResponse(response: JSONObject) {
try {
// final String meetingId = response.getString("meetingId");
// Intent intent = new Intent(JoinActivity.this, MainActivity.class);
// intent.putExtra("token", token);
// intent.putExtra("meetingId", meetingId);
// startActivity(intent);
} catch (e: JSONException) {
e.printStackTrace()
}
}
override fun onError(anError: ANError) {
anError.printStackTrace()
}
}
)
}
private fun joinMeeting(token: String, meetingId: String) {
AndroidNetworking
.post("$apiServerUrl/validate-meeting/{meetingId}")
.addPathParameter("meetingId", meetingId)
.addBodyParameter("token", token)
.build()
.getAsJSONObject(
object : JSONObjectRequestListener {
override fun onResponse(response: JSONObject) {
// Intent intent = new Intent(JoinActivity.this, MainActivity.class);
// intent.putExtra("token", token);
// intent.putExtra("meetingId", meetingId);
// startActivity(intent);
}
override fun onError(anError: ANError) {
anError.printStackTrace()
}
}
)
}
}
package live.videosdk.rtc.android.java;
import com.androidnetworking.AndroidNetworking;
import com.androidnetworking.error.ANError;
import com.androidnetworking.interfaces.JSONObjectRequestListener;
import org.json.JSONException;
import org.json.JSONObject;
public class JoinActivity extends AppCompatActivity {
private String apiServerUrl = "http://localhost:9000";
// ...
// onCreate() and other methods
private void getToken(@Nullable String meetingId) {
AndroidNetworking
.get(apiServerUrl + "/get-token")
.build()
.getAsJSONObject(
new JSONObjectRequestListener() {
@Override
public void onResponse(JSONObject response) {
try {
String token = response.getString("token");
if (meetingId == null) {
createMeeting(token);
} else {
joinMeeting(token, meetingId);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(ANError anError) {
anError.printStackTrace();
}
}
);
}
private void createMeeting(String token) {
AndroidNetworking
.post(apiServerUrl + "/create-meeting")
.addBodyParameter("token", token)
.addBodyParameter("region", "sg001")
.build()
.getAsJSONObject(
new JSONObjectRequestListener() {
@Override
public void onResponse(JSONObject response) {
try {
// final String meetingId = response.getString("meetingId");
// Intent intent = new Intent(JoinActivity.this, MainActivity.class);
// intent.putExtra("token", token);
// intent.putExtra("meetingId", meetingId);
// startActivity(intent);
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(ANError anError) {
anError.printStackTrace();
}
}
);
}
private void joinMeeting(String token, String meetingId) {
AndroidNetworking
.post(apiServerUrl + "/validate-meeting/{meetingId}")
.addPathParameter("meetingId", meetingId)
.addBodyParameter("token", token)
.build()
.getAsJSONObject(
new JSONObjectRequestListener() {
@Override
public void onResponse(JSONObject response) {
// Intent intent = new Intent(JoinActivity.this, MainActivity.class);
// intent.putExtra("token", token);
// intent.putExtra("meetingId", meetingId);
// startActivity(intent);
}
@Override
public void onError(ANError anError) {
anError.printStackTrace();
}
}
);
}
}
2. Initialization
After configuration, you will have to Initialize
meeting by providing name, meetingId, micEnabled, webcamEnabled & maxResolution.
NOTE : For React & React native developer, you have
to be familiar with hooks concept. You can understand hooks concept on React Hooks.

- Kotlin
- Java
import live.videosdk.rtc.android.VideoSDK;
import live.videosdk.rtc.android.Meeting;
class MainActivity : AppCompatActivity() {
private var meeting: Meeting? = null
override fun onCreate(savedInstanceState: Bundle?) {
// Configure parameters
val token = intent.getStringExtra("token")
val meetingId = intent.getStringExtra("meetingId")
val participantName = "John Doe"
val micEnabled = true
val webcamEnabled = true
val paticipantId="demo@123" // If you passed `null` then SDK will create an Id by itself and will use that id.
// Configure authentication token
VideoSDK.config(token)
// create a new meeting instance
meeting = VideoSDK.initMeeting(
this@MainActivity,
meetingId,
participantName,
micEnabled,
webcamEnabled,
paticipantId
)
}
}
import live.videosdk.rtc.android.VideoSDK;
import live.videosdk.rtc.android.Meeting;
public class MainActivity extends AppCompatActivity {
private Meeting meeting;
@Override
protected void onCreate(Bundle savedInstanceState) {
// Configure parameters
final String token = getIntent().getStringExtra("token");
final String meetingId = getIntent().getStringExtra("meetingId");
final String participantName = "John Doe";
final boolean micEnabled = true;
final boolean webcamEnabled = true;
final String participantId = "demo@123"; // If you passed `null` then SDK will create an Id by itself and will use that id.
// Configure authentication token
VideoSDK.config(token);
// create a new meeting instance
meeting = VideoSDK.initMeeting(
MainActivity.this,
meetingId,
participantName,
micEnabled,
webcamEnabled,
participantId
);
}
}
3. Join
After configuration & initialization, the third step is to call join() to join a meeting.
After joining, you will be able to Manage Participant in a meeting.

- Kotlin
- Java
// After receiving mic and webcam access permissions
// join the meeting
meeting!!.join()
// After receiving mic and webcam access permissions
// join the meeting
meeting.join();