-
- All Implemented Interfaces:
public interface SinchClientThe 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 classSinchClient.Companion
-
Method Summary
Modifier and Type Method Description abstract UnitcheckManifest()This method should be called before and be used during development time to verify that the manifest contains the permissions required. abstract UnitaddSinchClientListener(SinchClientListener sinchClientListener)Adds SinchClientListener object that handles events from the SinchClient. abstract UnitremoveSinchClientListener(SinchClientListener sinchClientListener)Remove listener for client events. abstract Unitstart()Starts the SinchClient. abstract UnitterminateGracefully()Terminates the Sinch client, while still leaving it some time to finish up currently pending tasks, for example finishing pending HTTP requests. abstract UnitrelayRemotePushNotification(CallNotificationResult callNotificationResult)Method used to forward the push notification payload. abstract UnitunregisterPushToken(PushTokenUnregistrationCallback pushTokenUnregistrationCallback)Unregisters any push token that has been registered for Sinch Managed Push (for the User that this instance is bound to). abstract CallControllergetCallController()Returns the CallController object for placing and receiving calls. abstract BooleanisStarted()Indicates if the SinchClient is started. abstract StringgetLocalUserId()Returns the id of the user associated with this SinchClient. abstract AudioControllergetAudioController()Returns an AudioController object for controlling different audio settings. abstract VideoControllergetVideoController()Returns a VideoController object for managing and retrieving views for Video calls. -
-
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.
-
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.
-
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.
-
-
-
-