ACSCallAgent Class

Declaration

@interface ACSCallAgent : NSObject;

Description

Call agent created by the CallClient factory method createCallAgent It bears the responsibility of managing calls on behalf of the authenticated user

Methods

dispose

Releases all the resources held by CallAgent. CallAgent should be destroyed/nullified after dispose. Closes this resource. This gets projected to java.lang.AutoCloseable.close() in Java projection.

-(void)dispose;

unregisterPushNotification

Unregister all previously registered devices from receiving incoming calls push notifications.

-(void)unregisterPushNotificationWithCompletionHandler:(void (^)(NSError *error))completionHandler;

Parameters

  • completionHandler - A block to be invoked asynchronously after the operation has finished.

Returns

  • void

startCall

Starts a call

-(void)startCall:(NSArray<id<CommunicationIdentifier>>* _Nonnull)participants
            options:(ACSStartCallOptions* _Nullable)options
withCompletionHandler:(void (^ _Nonnull)(ACSCall* _Nullable call, NSError* _Nullable error))completionHandler

Parameters

  • participants - Collection of participants to start the call with.
  • options - An instance of start call options.
  • completionHandler - A block to be invoked asynchronously after the operation has finished.

joinWithMeetingLocator

Joins a group meeting.

-(void)joinWithMeetingLocator:(ACSJoinMeetingLocator* _Nonnull)meetingLocator
              joinCallOptions:(ACSJoinCallOptions* _Nullable)joinCallOptions
withCompletionHandler:(void (^ _Nonnull)(ACSCall* _Nullable call, NSError* _Nullable error))completionHandler;

Parameters

  • meetingLocator - Id or meeting link to join a group meeting.
  • joinCallOptions - Options for joining the group meeting.
  • completionHandler - A block to be invoked asynchronously after the operation has finished.

registerPushNotifications

Register devices to receive incoming call push notifications.

-(void)registerPushNotifications: (NSData* _Nonnull)deviceToken withCompletionHandler:(void (^ _Nonnull)(NSError* _Nullable error))completionHandler;

Parameters

  • deviceToken - Devices to be registered for push notification.
  • completionHandler - A block to be invoked asynchronously after the operation has finished.

handlePushNotification

Handles the info of push notification.

-(void)handlePushNotification:(ACSPushNotificationInfo* _Nonnull)notification withCompletionHandler:(void (^_Nonnull)(NSError* _Nullable error))completionHandler;

Parameters

  • notification - Payload of the push notification.
  • completionHandler - A block to be invoked asynchronously after the operation has finished.

Properties

delegate

An object you provide to receive events from this ACSCallAgent instance.

@property(nonatomic, assign) id<ACSCallAgentDelegate> delegate;

calls

Returns the list of all active calls.

@property (copy, nonnull, readonly) NSArray<ACSCall *> * calls;