For the detailed interface documentation, please visit our Android doc in https://zoom.github.io/zoom-sdk-android/

Integration Flow

1. Initialize the SDK

ZoomSDK sdk = ZoomSDK.getInstance();
sdk.initialize(this, APP_KEY, APP_SECRET, WEB_DOMAIN, this);

Register ZoomSDKInitializeListener to get initialize result.

 

2. Login/Logout

There are two options for your app to pass login credentials to the SDK.

1. Use the SDK key/secret from the user account (SDK user)

you need to pass User ID, Zoom Token.

int ret = meetingService.startMeeting(this, USER_ID, ZOOM_TOKEN, STYPE, meetingNo, DISPLAY_NAME, opts);

2. Pass the Zoom user credentials (login/password) (Login user)

Login

ZoomSDK zoomSDK = ZoomSDK.getInstance();
if(!(zoomSDK.loginWithZoom(userName, password) ==ZoomApiError.ZOOM_API_ERROR _ SUCCESS))
{ //Error message }
else {//something else}

Logout

ZoomSDK zoomSDK = ZoomSDK.getInstance(); if(!zoomSDK.logoutZoom())
{//Error message }
else {//something else}

Register ZoomSDKAuthenticationListener to get login/logout result.

 

3. Start/Join Meeting

Create Meeting Service

ZoomSDK zoomSDK = ZoomSDK.getInstance();
if(!zoomSDK.isInitialized())
{//Error message
return;}
MeetingService meetingService = zoomSDK.getMeetingService();

Start Meeting

After the SDK is initialized, the app can start a zoom meeting.

For SDK user, you need to pass User ID, Token to start meeting:

MeetingOptions opts = new MeetingOptions();
//no_driving_mode = true;
//no_meeting_end_message = true;
//no_titlebar = true;
//no_bottom_toolbar = true;
//no_invite = true;
//……………
int ret = meetingService.startMeeting(this, USER_ID, ZOOM_TOKENUSER _TYPE, meetingNo, DISPLAY_NAME, opts);

For Login user:

MeetingOptions opts = new MeetingOptions();
//no_driving_mode = true;
//no_meeting_end_message = true;
//no_titlebar = true;
//no_bottom_toolbar = true;
//no_invite = true;
//……………

int ret = meetingService.startMeeting(this, meetingNo, opts);

Join Meeting:

After SDK initialized, partner app can join a zoom meeting

ZoomSDK zoomSDK = ZoomSDK.getInstance();
if(!zoomSDK.isInitialized())
{//Error message
return;}
MeetingService meetingService = zoomSDK.getMeetingService();
MeetingOptions opts = new MeetingOptions();
//no_driving_mode = true;
//no_meeting_end_message = true;
//no_titlebar = true;
//no_bottom_toolbar = true;
//no_invite = true;
//……………
int ret = meetingService.joinMeeting(this, meetingNo, DISPLAY_NAME, meetingPassword, opts);

Listener for Meeting Service

Register MeetingServiceListener to get meeting event.

4. Pre-Meeting Functions

After Zoom user is logged in, the app can schedule, edit, delete or get a meeting item

Create Pre-Meeting Service

ZoomSDK zoomSDK = ZoomSDK.getInstance();
if(zoomSDK.isInitialized()) { PreMeetingService preMeetingServic =
zoomSDK.getPreMeetingService();}

Pre-Meeting Service function Api

public boolean editMeeting(String meetingId, MeetingItem item);//edit a meeting
public boolean scheduleMeeting(MeetingItem item);// schedule a meeting publicboolean deleteMeeting(MeetingItem item); // delete a meeting
public MeetingItem getMeetingItemByIndex(int index); // get a meeting item by index
public MeetingItem getMeetingItemByNumber(long meetingNumber); //get a meeting itemby meeting number

Listener for Pre-Meeting Service

Register PreMeetingServiceListener to get function call result.

 

5. Get MeetingSettingsHelper

ZoomSDK zoomSDK = ZoomSDK.getInstance();
if(!zoomSDK.isInitialized()) {
//Error message return;}
MeetingSettingsHelper meetingSettings = zoomSDK.getMeetingSettingsHelper();

 

6. Meeting Options

You can join a meeting with customized options such as disable driver mode, disable meeting invitation, customize invitation action list , show/hide meeting views etc.

MeetingOptions opts = new MeetingOptions();
opts.no_driving_mode = true;
opts.no_invite = true;
opts.no_meeting_end_message = true;
opts.no_meeting_error_message = true;
opts.no_titlebar = true;
opts.no_bottom_toolbar = true;
opts.no_dial_in_via_phone = true;
opts.no_dial_out_to_phone = true;
opts.no_disconnect_audio = true;
opts.invite_options = InviteOptions.INVITE_VIA_EMAIL +InviteOptions.INVITE_VIA_SMS + InviteOptions.INVITE_COPY_URL;
opts.meeting_views_options= MeetingViewsOptions.NO_BUTTON_SHARE +
MeetingViewsOptions.NO_BUTTON_VIDEO;
int ret = meetingService.startMeeting(this, USER_ID, ZOOM_TOKENSTYPE, meetingNo, DISPLAY_NAME, opts);

For details, please see MeetingOptions and MeetingViewsOptions class in api docs

 

7. Customize Invitation Method

Define an activity with intent-filter as below:

<activity android:name="us.zoom.sdkexample.MyInviteActivity"
android:label="@string/invite_acitivity_name"
android:icon="@drawable/ic_launcher" >
<intent-filter>
<action android:name="us.zoom.sdkexample.intent.action.MeetingInvite"/>
<category android:name="android.intent.category.DEFAULT"/> </intent-filter>
</activity>

The action name should be your application package name plus “.intent.action.MeetingInvite”. This activity even can be defined in another application.

Then the activity will be listed at the top of the invite methods list.

Click the item that will open the activity with join meeting URL, invitation topic and invitation content as arguments in the intent. Retrieve them as below:

Intent intent = getIntent();
Uri uri = intent.getData();
String subject = intent.getStringExtra(AndroidAppUtil.EXTRA_SUBJECT);
String text = intent.getStringExtra(AndroidAppUtil.EXTRA_TEXT);
//You can also define this bool value in config.xml to remove all default invite options and remain only your totally customized invite activity.
<bool name="zm_config_invite_by_only_action_meeting_invite">true</bool>

 

8. Customize Joining Before Host View

With this interface, your app can customize the waiting room text or insert a custom image.

Define an activity with intent-filter as below:

<activity android:name="us.zoom.sdkexample.MyWaitJoinActivity" android:icon="@drawable/ic_launcher" >
<intent-filter>
<action android:name="us.zoom.sdkexample.intent.action.JoinBeforeHost" />
<category android:name="android.intent.category.DEFAULT"/> </intent-filter>
</activity>

The action name should be your application package name plus “.intent.action.JoinBeforeHost”. Meeting topic, meeting id, time and meeting type ( is repeat or not ) can retrieve from the intent arguments. Retrieve them as below:

Intent intent = getIntent();
Uri uri = intent.getData();
String topic = intent.getStringExtra(AndroidAppUtil.EXTRA_TOPIC);
long meetingId = intent.getLongExtra(AndroidAppUtil.EXTRA_MEETING_ID, 0);

Finish your custom waiting join activity when the meeting is ready to join. Register MeetingServiceListener and implement callback method (onMeetingEvent) , handler the event MeetingEvent.MEETING_READY_TO_JOIN to return meeting.

 

9. Customize Invitation email subject and content, SMS content, Copy URL text

Add your invitation content generator class which must implement interface:

com.zipow.videobox.util.InviteContentGenerator

Override and implement genEmailTopic and getEmailContent method and set your Email subject and content as the method return value.

Override and implement genSmsContent method and set your Sms content as the method return value.

Override and implement genCopyUrlText method and set your copy url content as the method return value.

If the return value is null or empty, it will use the zoom default invitation template.

Four input parameters have been provided, you can use them to generate your subject and content:

Application’s context, meeting’s id, meeting url ,user screen name and meeting password

Add a string resource named “zm_config_invite_content_generator” and set your content generator class full name as the string’s value.

For detail, you can see the “MyInviteContentGenerator” and config.xml in example

 

10. Embed Meeting UI into another Activity

example2 in Zoom Android SDK package shows how to embed Zoom meeting UI into another activity.

As you can see in example2, in order for MyMeetingActivity to run, you should put this into a separate process. You can look at example2’s AndroidManifest.xml. MyMeetingActivity can not be sub activity of other activities, it needs to bounded at the most outside of other activities. Other activities can be sub activities of MyMeetingActivity. The process where MyMeetingActivity is located will auto-restart for several situations, for example: disconnection of meeting service, crashing of meeting service. If there is no meeting, there is also no meeting process, so MyMeetingActivity also won’t start. you have to follow this rule in your application – otherwise Zoom SDK can’t handle it.

11. Get in meeting service

If code is running in meeting process, InMeetingService object and functions will be reachable. You can get a InMeetingService object like below:

ZoomSDK zoomSDK = ZoomSDK.getInstance();
MeetingService inMeetingService = zoomSDK.getInMeetingService();//Will return null if the code doesn’t run in meeting process.

Listener for In-Meeting Service

Register InMeetingServiceListener to get in meeting function call result. Note: All the callbacks will be reachable in meeting process.

 

12. Enable sharing file from google drive in meeting

Dependency JARS:

Google Auth Process:

Call ZoomSdk interface to set your google android appliction client id and redirect url

ZoomSDK sdk = ZoomSDK.getInstance();
sdk.setGoogleDriveInfo(this, CLIENT_ID ,REDIRECT_URI);

Register your application on Google API console and get your android application client ID and redirect uri from: https://code.google.com/apis/console

Zoom sdk use the information to get the Google Credential by authorize code.

Redirect url : For use with requests from a web server. This is the path in your application that users are redirected to after they have authenticated with Google. The path will be appended with the authorization code for access. From: https://developers.google.com/identity/protocols/OAuth2InstalledApp

The Redirect url will be com.example.app:redirect_uri_path

com.example.app is your android application packcage name

redirect_uri_path just set as /oauth2redirect.

 

Define GoogleAuthactivity in your project manifest to handle the url scheme

     <activity
android:name="com.zipow.google_login.GoogleAuthActivity"
android:configChanges="orientation|screenSize"
android:launchMode="singleTask" >
<intent-filter>
               <!-- Change to your url scheme-->
               <data android:scheme="com.example.app" />
               <action android:name="android.intent.action.VIEW" />
               <category android:name="android.intent.category.BROWSABLE" />
               <category android:name="android.intent.category.DEFAULT" />
           </intent-filter>
</activity>