Preparation


Contents

1. Create a new project

2. Import Zoom SDK libraries

3. Create Constants for keys & secrets

1. Create a new project

We will start by creating a new project. Open your Android Studio, navigate to File > New > New Project:

File > New > New Project
File > New > New Project

Then, enter your Application name, Company domain, select your Project location:

Next, select the platform that you are going to develop, in this tutorial, we will need to select Phone and Tablet. You will also need to select Minimum API.

To know the minimum and maximum API that is supported by our SDK, please check here: Minimum & Maximum API

Android Studio has provided some templates to help us to get started on Android application development, select Basic Activity and press Next:

The next step is to configure the MainActivity, leave every fill with default value and press Finish.

A project with some basic settings will be created by Android Studio.

You can try to build and run this sample app on your emulator or on your device to make sure everything is working well.

2. Import Zoom SDK libraries

When the project is ready, next we are going to import Zoom SDK libraries.

2.1 Copy libraries to your root folder

If you have not downloaded our Zoom SDK, please press the following button to download:

The downloaded file includes SDK libraries and sample apps. The SDK libraries (aar libraries) are in the commonlib and mobilertc folders. Please ensure the following files are in these folders, if any of them is missing, please re-download them.

commonlib

commonlib/
├── build.gradle
├── commonlib.aar
└── commonlib.iml

mobilertc

mobilertc/
├── build.gradle
├── mobilertc.aar
└── mobilertc.iml

Keep the window that has these two folders, open another window and navigate to the folder of your newly created project. In the root folder of your project, create a new folder called libs, and copy the commonlib and mobilertc folders into it.

2.2 Add modules and configure dependencies

Back to Android Studio, open “Project Structure” and press “+ (Add Module)”.

Select “Import .JAR/.AAR Package”, locate the aar files in your libs file and add them into your project.

You will need to do it twice, one for commonlib.arr and one for mobilertc.arr.

Last but not least, select your own module in the Project Structure, and add the libraries as dependencies.

Now our project is equipped with Zoom SDK.

3. Create Constants for keys & secrets

Next, we are going to create a Constants interface to store constants like SDK keys and secrets. Right click on the package name and select New > Java Class to add a new class.

Name the class Constants, change the kind to Interface and press OK.

You will get an interface class and you can put the following code into it:

Constants.java

public interface Constants {
  
/**
*    ========== Disclaimer ==========
*
*    Please be aware that all hard-coded variables and constants 
*    shown in the documentation and in the demo, such as Zoom Token, 
*    Zoom Access, Token, etc., are ONLY FOR DEMO AND TESTING PURPOSES.
*    We STRONGLY DISCOURAGE the way of HARDCODING any Zoom Credentials
*    (username, password, API Keys & secrets, SDK keys & secrets, etc.)
*    or any Personal Identifiable Information (PII) inside your application. 
*    WE DON’T MAKE ANY COMMITMENTS ABOUT ANY LOSS CAUSED BY HARD-CODING CREDENTIALS
*    OR SENSITIVE INFORMATION INSIDE YOUR APP WHEN DEVELOPING WITH OUR SDK.
*
*/

// Change it to your APP Key
public final static String APP_KEY = "Your APP Key";

// Change it to your APP Secret
public final static String APP_SECRET = "Your APP Secret";

// ==============
/* If you would like to ask your user to login with their own credentials, you don't need to fill up the following. */

// Change it to your user ID
public final static String USER_ID = "Your user ID from REST API";

// Change it to your zoom token
public final static String ZOOM_TOKEN = "Your zoom token from REST API";

// Change it to your zoom access token(ZAK)
public final static String ZOOM_ACCESS_TOKEN = "Your zoom access token(ZAK) from REST API";

}

Replace the APP_KEY and APP_SECRET with your own SDK key & secret. If you have trouble getting these two credentials, please refer to the Prerequisites in Getting started for further information.

Last, in your MainActivity.java, modify your code to be:

MainActivity.java

public class MainActivity extends AppCompatActivity implements Constants, ZoomSDKInitializeListener, MeetingServiceListener, ZoomSDKAuthenticationListener {
   ...
}

ZoomSDKInitializeListener,MeetingServiceListener and ZoomSDKAuthenticationListener are not related to Constants, but we will need them for our later tutorial.