Package

## Interface SinchClient

- All Implemented Interfaces:

      public interface SinchClient

  The SinchClient is the Sinch SDK entry point.

  It provides access to the feature classes in the Sinch SDK: CallController, AudioController and VideoController. It's also used to configure the user's and device's capabilities.

  The user IDs that are used to identify users application specific. If the app already has a scheme for user IDs (email addresses, phone numbers, customer numbers, etc.), the same ID could be used when configuring the SinchClient.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `public class` | `SinchClient.Companion` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract Unit` | `checkManifest()` | This method should be called before and be used during development time to verify that the manifest contains the permissions required.
    `abstract Unit` | `addSinchClientListener(SinchClientListener sinchClientListener)` | Adds SinchClientListener object that handles events from the SinchClient.
    `abstract Unit` | `removeSinchClientListener(SinchClientListener sinchClientListener)` | Remove listener for client events.
    `abstract Unit` | `start()` | Starts the SinchClient.
    `abstract Unit` | `terminateGracefully()` | Terminates the Sinch client, while still leaving it some time to finish up currently pending tasks, for example finishing pending HTTP requests.
    `abstract Unit` | `relayRemotePushNotification(CallNotificationResult callNotificationResult)` | Method used to forward the push notification payload.
    `abstract Unit` | `unregisterPushToken(PushTokenUnregistrationCallback pushTokenUnregistrationCallback)` | Unregisters any push token that has been registered for Sinch Managed Push (for the User that this instance is bound to).
    `abstract CallController` | `getCallController()` | Returns the CallController object for placing and receiving calls.
    `abstract Boolean` | `isStarted()` | Indicates if the SinchClient is started.
    `abstract String` | `getLocalUserId()` | Returns the id of the user associated with this SinchClient.
    `abstract AudioController` | `getAudioController()` | Returns an AudioController object for controlling different audio settings.
    `abstract VideoController` | `getVideoController()` | Returns a VideoController object for managing and retrieving views for Video calls.

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

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

- - ### Constructor Detail

  - ### Method Detail

    - #### checkManifest

           abstract Unit checkManifest()

      This method should be called before and be used during development time to verify that the manifest contains the permissions required. Once the application is ready to be published any calls to this manifest can be removed.

    - #### addSinchClientListener

           abstract Unit addSinchClientListener(SinchClientListener sinchClientListener)

      Adds SinchClientListener object that handles events from the SinchClient.

      Parameters:
        `sinchClientListener` - A SinchClientListener instance.

    - #### removeSinchClientListener

           abstract Unit removeSinchClientListener(SinchClientListener sinchClientListener)

      Remove listener for client events.

      Parameters:
        `sinchClientListener` - A SinchClientListener to be removed.

    - #### start

           abstract Unit start()

      Starts the SinchClient. This must be done prior to making any calls.

    - #### terminateGracefully

           abstract Unit terminateGracefully()

      Terminates the Sinch client, while still leaving it some time to finish up currently pending tasks, for example finishing pending HTTP requests.

    - #### relayRemotePushNotification

           abstract Unit relayRemotePushNotification(CallNotificationResult callNotificationResult)

      Method used to forward the push notification payload. This will implicitly start the SinchClient if it wasn't already started.

      Parameters:
        `callNotificationResult` - Payload received from a RemoteMessage data and parsed with SinchPush.queryPushNotificationPayload.

    - #### unregisterPushToken

           abstract Unit unregisterPushToken(PushTokenUnregistrationCallback pushTokenUnregistrationCallback)

      Unregisters any push token that has been registered for Sinch Managed Push (for the User that this instance is bound to).

      Parameters:
        `pushTokenUnregistrationCallback` - is a callback for push token unregistration events.

    - #### getCallController

           abstract CallController getCallController()

      Returns the CallController object for placing and receiving calls.

    - #### isStarted

           abstract Boolean isStarted()

      Indicates if the SinchClient is started.

    - #### getLocalUserId

           abstract String getLocalUserId()

      Returns the id of the user associated with this SinchClient.

    - #### getAudioController

           abstract AudioController getAudioController()

      Returns an AudioController object for controlling different audio settings. You may only call this while the SinchClient is started.

    - #### getVideoController

           abstract VideoController getVideoController()

      Returns a VideoController object for managing and retrieving views for Video calls. You may only call this while the SinchClient is started.