us.zoom.sdk

## Class ZoomSDK

- java.lang.Object
- - us.zoom.sdk.ZoomSDK

-     public class ZoomSDK
      extends java.lang.Object

  Zoom SDK global manager

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAuthenticationListener(ZoomSDKAuthenticationListener listener)` Register a listener for login or logout event
    `java.lang.String` | `getDomain()` Get Zoom site domain name
    `InMeetingService` | `getInMeetingService()` Get InMeetingService instance
    `static ZoomSDK` | `getInstance()` Get shared instance of ZoomSDK
    `MeetingService` | `getMeetingService()` Get MeetingService instance
    `MeetingSettingsHelper` | `getMeetingSettingsHelper()` Get MeetingSettingsHelper instance
    `java.lang.String` | `getPreferenceKeyIsAppVerified()`
    `java.lang.String` | `getPreferenceKeyLastVerifiedAppKey()`
    `java.lang.String` | `getPreferenceKeyLastVerifiedAppSecret()`
    `PreMeetingService` | `getPreMeetingService()` Get PreMeetingService instance
    `java.util.Locale` | `getSdkLocale(android.content.Context context)` Get current Zoom Sdk Locale configuration
    `java.lang.String` | `getVersion(android.content.Context context)`
    `void` | `initialize(android.content.Context context, java.lang.String appKey, java.lang.String appSecret, boolean autoRetryVerifyApp, ZoomSDKInitializeListener listener)` Initialize ZoomSDK
    `void` | `initialize(android.content.Context context, java.lang.String appKey, java.lang.String appSecret, java.lang.String domain, boolean autoRetryVerifyApp, ZoomSDKInitializeListener listener)` Initialize ZoomSDK
    `void` | `initialize(android.content.Context context, java.lang.String appKey, java.lang.String appSecret, java.lang.String domain, ZoomSDKInitializeListener listener)` Initialize ZoomSDK Zoom SDK will retry to call verifyApp automatically if failed because of network issue
    `void` | `initialize(android.content.Context context, java.lang.String appKey, java.lang.String appSecret, ZoomSDKInitializeListener listener)` Initialize ZoomSDK Zoom SDK will retry to call verifyApp automatically if failed because of network issue.
    `boolean` | `isDeviceSupported(android.content.Context context)`
    `boolean` | `isInitialized()` Check if ZoomSDK has been initialized
    `boolean` | `isLoggedIn()` Check if Zoom user is logged in.
    `int` | `loginWithSSOToken(java.lang.String ssoToken)` Login Zoom SDK with SSO token.
    `int` | `loginWithZoom(java.lang.String email, java.lang.String password)` Login Zoom SDK with work email account.
    `boolean` | `logoutZoom()` Logout Zoom SDK.
    `void` | `removeAuthenticationListener(ZoomSDKAuthenticationListener listener)` Unregister a listener for login or logout event
    `boolean` | `setBoxAppKeyPair(android.content.Context context, java.lang.String appKey, java.lang.String appSecret)` Deprecated.
    `void` | `setDomain(java.lang.String domain)` Set Zoom site domain name
    `boolean` | `setDropBoxAppKeyPair(android.content.Context context, java.lang.String appKey, java.lang.String appSecret)` Deprecated.
    `boolean` | `setGoogleDriveInfo(android.content.Context context, java.lang.String clientId, java.lang.String redirectURL)` Deprecated.
    `boolean` | `setOneDriveClientId(android.content.Context context, java.lang.String clientId)` Deprecated.
    `void` | `setSdkLocale(android.content.Context context, java.util.Locale locale)` Set Zoom Sdk Locale configuration
    `void` | `setShowProxyServerDialogImmediatelyIfNeeded(boolean show)` Set Zoom Sdk if showing proxy server setting dialog immediately or delaying this action
    `int` | `tryAutoLoginZoom()` Auto login Zoom SDK with local zoom/sso token.
    `void` | `verifyApp(java.lang.String appKey, java.lang.String appSecret, boolean autoRetryVerifyApp)` Verify the application.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static ZoomSDK getInstance()

      Get shared instance of ZoomSDK
      Returns:
        The ZoomSDK istance

    - #### addAuthenticationListener

          public void addAuthenticationListener(ZoomSDKAuthenticationListener listener)

      Register a listener for login or logout event
      Parameters:
        `listener` - the listener instance

    - #### removeAuthenticationListener

          public void removeAuthenticationListener(ZoomSDKAuthenticationListener listener)

      Unregister a listener for login or logout event
      Parameters:
        `listener` - the listener instance

    - #### initialize

          public void initialize(android.content.Context context,
                                 java.lang.String appKey,
                                 java.lang.String appSecret,
                                 ZoomSDKInitializeListener listener)

      Initialize ZoomSDK Zoom SDK will retry to call verifyApp automatically if failed because of network issue.
      Parameters:
        `context` - Android context
        `appKey` - Your APP Key from zoom.us
        `appSecret` - Your APP Secret from zoom.us
        `listener` - Listener for initialize result

    - #### initialize

          public void initialize(android.content.Context context,
                                 java.lang.String appKey,
                                 java.lang.String appSecret,
                                 boolean autoRetryVerifyApp,
                                 ZoomSDKInitializeListener listener)

      Initialize ZoomSDK
      Parameters:
        `context` - Android context
        `appKey` - Your APP Key from zoom.us
        `appSecret` - Your APP Secret from zoom.us
        `autoRetryVerifyApp` - If it is true, Zoom SDK will retry to call verifyApp automatically if failed because of network issue. Else user needs to call verifyApp manually after initialize failed.
        `listener` - Listener for initialize result

    - #### initialize

          public void initialize(android.content.Context context,
                                 java.lang.String appKey,
                                 java.lang.String appSecret,
                                 java.lang.String domain,
                                 ZoomSDKInitializeListener listener)

      Initialize ZoomSDK Zoom SDK will retry to call verifyApp automatically if failed because of network issue
      Parameters:
        `context` - Android context
        `appKey` - Your APP Key from zoom.us
        `appSecret` - Your APP Secret from zoom.us
        `domain` - Zoom site domain name. Default value is zoom.us
        `listener` - Listener for initialize result

    - #### initialize

          public void initialize(android.content.Context context,
                                 java.lang.String appKey,
                                 java.lang.String appSecret,
                                 java.lang.String domain,
                                 boolean autoRetryVerifyApp,
                                 ZoomSDKInitializeListener listener)

      Initialize ZoomSDK
      Parameters:
        `context` - Android context
        `appKey` - Your APP Key from zoom.us
        `appSecret` - Your APP Secret from zoom.us
        `domain` - Zoom site domain name. Default value is zoom.us
        `autoRetryVerifyApp` - If it is true, Zoom SDK will retry to call verifyApp automatically if failed because of network issue. Else user needs to call verifyApp manually after initialize failed.
        `listener` - Listener for initialize result

    - #### getVersion

          public java.lang.String getVersion(android.content.Context context)

    - #### isDeviceSupported

          public boolean isDeviceSupported(android.content.Context context)

    - #### verifyApp

          public void verifyApp(java.lang.String appKey,
                                java.lang.String appSecret,
                                boolean autoRetryVerifyApp)

      Verify the application. The application must be verified before it is able to connect to a Zoom meeting. This method will be called automatically on `initialize` being called.
      Parameters:
        `appKey` - Your APP Key from zoom.us
        `appSecret` - Your APP Secret from zoom.us
        `autoRetryVerifyApp` - If it is true, Zoom SDK will retry to call verifyApp automatically if failed because of network issue. Else user needs to call verifyApp manually after initialize failed.

    - #### isInitialized

          public boolean isInitialized()

      Check if ZoomSDK has been initialized
      Returns:
        true if it is initialized

    - #### loginWithZoom

          public int loginWithZoom(java.lang.String email,
                                   java.lang.String password)

      Login Zoom SDK with work email account. This method is optional, if you do not have work email account in Zoom, just ignore it.
      Parameters:
        `email` - login email account.
        `password` - login password.
      Returns:
        result login zoom error code in ZoomApiError

    - #### loginWithSSOToken

          public int loginWithSSOToken(java.lang.String ssoToken)

      Login Zoom SDK with SSO token.
      Parameters:
        `ssoToken` - SSO token
      Returns:
        result login zoom error code in ZoomApiError

    - #### logoutZoom

          public boolean logoutZoom()

      Logout Zoom SDK. This method is optional, if you do not have work email/sso account in Zoom, just ignore it
      Returns:
        true, if user can logout.

    - #### isLoggedIn

          public boolean isLoggedIn()

      Check if Zoom user is logged in. This method is optional, if you do not have work email account in Zoom, just ignore it
      Returns:
        true, if user is logged.

    - #### tryAutoLoginZoom

          public int tryAutoLoginZoom()

      Auto login Zoom SDK with local zoom/sso token. This method is optional, if you do not have work email/sso account in Zoom, just ignore it
      Returns:
        result login zoom errorcode in ZoomApiError

    - #### setDomain

          public void setDomain(java.lang.String domain)

      Set Zoom site domain name
      Parameters:
        `domain` - The Zoom site domain name to set. Default value is zoom.us.

    - #### getDomain

          public java.lang.String getDomain()

      Get Zoom site domain name
      Returns:
        current Zoom site to use.

    - #### setSdkLocale

          public void setSdkLocale(android.content.Context context,
                                   java.util.Locale locale)

      Set Zoom Sdk Locale configuration
      Parameters:
        `context` - Android context
        `locale` - the locale language code can not be null

    - #### getSdkLocale

          public java.util.Locale getSdkLocale(android.content.Context context)

      Get current Zoom Sdk Locale configuration
      Parameters:
        `context` - Android context
      Returns:
        current sdk locale

    - #### setShowProxyServerDialogImmediatelyIfNeeded

          public void setShowProxyServerDialogImmediatelyIfNeeded(boolean show)

      Set Zoom Sdk if showing proxy server setting dialog immediately or delaying this action
      Parameters:
        `show` - if true means showing proxy server dialog immediately if needed. if false means not showing this Dialog before setting this interface as true.

    - #### setDropBoxAppKeyPair

          @Deprecated
          public boolean setDropBoxAppKeyPair(android.content.Context context,
                                                           java.lang.String appKey,
                                                           java.lang.String appSecret)

      Deprecated.
      DropBox App key pair must be set to enable "Share Dropbox". You need also to declare Dropbox AuthActivity in the AndroidManifest.xml as follows, and replace {YourAppKey} with the appKey: `<activity android:name="com.dropbox.client2.android.AuthActivity" android:configChanges="orientation|keyboard" android:theme="@style/ZMTheme.SubWindow" android:launchMode="singleTask" > <intent-filter> <!-- Change this to be db- followed by your app key --> <data android:scheme="db-{YourAppKey}" /> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>` You can register your application on DropBox and get your app key pair from: https://www.dropbox.com/developers/apps
      Parameters:
        `context` - Context to use
        `appKey` - Dropbox app key
        `appSecret` - Dropbox app secret
      Returns:
        success or not

    - #### setOneDriveClientId

          @Deprecated
          public boolean setOneDriveClientId(android.content.Context context,
                                                          java.lang.String clientId)

      Deprecated.
      OneDrive client ID must be set to enable "Share OneDrive". You can register your application on Microsoft OneDrive and get your client ID from: http://go.microsoft.com/fwlink/p/?LinkId=193157
      Parameters:
        `context` - Context to use
        `clientId` - OneDrive app client id
      Returns:
        success or not

    - #### setBoxAppKeyPair

          @Deprecated
          public boolean setBoxAppKeyPair(android.content.Context context,
                                                       java.lang.String appKey,
                                                       java.lang.String appSecret)

      Deprecated.
      Box App key pair must be set to enable "Share Box". You need also to download Box Android library v2 and Box Java library from https://developers.box.com. Add this libraries to your project's dependency. Declare Box OAuthActivity in the AndroidManifest.xml as follows: `<activity android:name="com.box.boxandroidlibv2.activities.OAuthActivity" />` You can register your application on Box and get your app key pair from: https://developers.box.com
      Parameters:
        `context` - Context to use
        `appKey` - Box app key
        `appSecret` - Box app secret
      Returns:
        success or not

    - #### setGoogleDriveInfo

          @Deprecated
          public boolean setGoogleDriveInfo(android.content.Context context,
                                                         java.lang.String clientId,
                                                         java.lang.String redirectURL)

      Deprecated.
      Google Drive client ID must be set to enable "Share Google Drive". As Google will no longer allow OAuth requests to Google in embedded browsers known as "web-views", user need to auth google in device browser From: https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html To enbale share google drive in meeting, please see section : Enable share with google drive in help doc. You can register your application on Google API console and get your android client ID from: https://code.google.com/apis/console
      Parameters:
        `context` - Context to use
        `clientId` - Your android application client id
        `redirectURL` - Your android application redirect url(Like:com.example.app:/oauth2redirect com.example.app is client id android package name)
      Returns:
        api call success or not

    - #### getMeetingService

          public MeetingService getMeetingService()

      Get MeetingService instance
      Returns:
        The shared instance of MeetingService. Return null if the SDK has not been initialized successfully.

    - #### getPreMeetingService

          public PreMeetingService getPreMeetingService()

      Get PreMeetingService instance
      Returns:
        The shared instance of PreMeetingService. Return null if the SDK has not been initialized successfully or User not login.

    - #### getInMeetingService

          public InMeetingService getInMeetingService()

      Get InMeetingService instance
      Returns:
        The shared instance of InMeetingService. Return null if not being called in meeting process.

    - #### getMeetingSettingsHelper

          public MeetingSettingsHelper getMeetingSettingsHelper()

      Get MeetingSettingsHelper instance
      Returns:
        The shared instance of MeetingSettingsHelper. Return null if the SDK has not been initialized successfully.

    - #### getPreferenceKeyLastVerifiedAppSecret

          public java.lang.String getPreferenceKeyLastVerifiedAppSecret()

    - #### getPreferenceKeyLastVerifiedAppKey

          public java.lang.String getPreferenceKeyLastVerifiedAppKey()

    - #### getPreferenceKeyIsAppVerified

          public java.lang.String getPreferenceKeyIsAppVerified()