-
public final class CallComposite
Azure android communication calling composite component.
Instantiating Call Composite
// Initialize the call composite builder final CallCompositeBuilder builder = new CallCompositeBuilder() .theme(themeId) .localization(new LocalizationConfiguration(Locale.CHINESE, LayoutDirection.RTL)); // Build the call composite CallComposite callComposite = builder.build();
-
-
Method Summary
-
-
Method Detail
-
launch
@Deprecated() void launch(Context context, CallCompositeRemoteOptions remoteOptions)
Launch group call composite.
- Parameters:
context
- The android context used to start the Composite.remoteOptions
- The CallCompositeRemoteOptions has remote parameters tolaunch call experience.
-
launch
@Deprecated() void launch(Context context, CallCompositeRemoteOptions remoteOptions, CallCompositeLocalOptions localOptions)
Launch group call composite.
- Parameters:
context
- The android context used to start the Composite.remoteOptions
- The CallCompositeRemoteOptions has remote parameters tolaunch group call experience.localOptions
- The CallCompositeLocalOptions has local parameters tolaunch group call experience.
-
launch
void launch(Context activityContext, CallCompositeJoinLocator locator)
Launch composite to join a groupCall/TeamsMeeting.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
- Parameters:
activityContext
- The android context used to start the Composite.locator
- The CallCompositeJoinLocator.
-
launch
void launch(Context activityContext, CallCompositeJoinLocator locator, CallCompositeLocalOptions localOptions)
Launch composite to join a groupCall/TeamsMeeting with CallCompositeLocalOptions.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
- Parameters:
activityContext
- The android context used to start the Composite.locator
- The CallCompositeJoinLocator.localOptions
- The CallCompositeLocalOptions has local parameters tolaunch call experience.
-
launch
void launch(Context activityContext, Collection<CommunicationIdentifier> participants, CallCompositeLocalOptions localOptions)
Launch composite to dial participants.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
- Parameters:
activityContext
- The android context used to start the Composite.participants
- The collection of CommunicationIdentifier to start the call.localOptions
- The CallCompositeLocalOptions has local parameters tolaunch call experience.
-
launch
void launch(Context activityContext, Collection<CommunicationIdentifier> participants)
Launch composite to dial participants.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
- Parameters:
activityContext
- The android context used to start the Composite.participants
- The collection of CommunicationIdentifier to start the call.
-
accept
void accept(Context activityContext, String incomingCallId, CallCompositeLocalOptions localOptions)
Accept incoming call.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
- Parameters:
activityContext
- The android context used to start the Composite.incomingCallId
- The call id.localOptions
- The CallCompositeLocalOptions.
-
accept
void accept(Context activityContext, String incomingCallId)
Accept incoming call.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
- Parameters:
activityContext
- The android context used to start the Composite.incomingCallId
- The call id.
-
reject
CompletableFuture<Void> reject(String incomingCallId)
Reject incoming call.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
- Parameters:
incomingCallId
- The call id.
-
addOnIncomingCallEventHandler
void addOnIncomingCallEventHandler(CallCompositeEventHandler<CallCompositeIncomingCallEvent> handler)
Add on incoming call event handler CallCompositeEventHandler.
// add on incoming call event handler. callComposite.addOnIncomingCallEventHandler(event -> { // Process incoming call event System.out.println(event.getCallId()); System.out.println(event.getCallerDisplayName()); });
- Parameters:
handler
- The CallCompositeEventHandler.
-
removeOnIncomingCallEventHandler
void removeOnIncomingCallEventHandler(CallCompositeEventHandler<CallCompositeIncomingCallEvent> handler)
Remove on incoming call event handler CallCompositeEventHandler.
- Parameters:
handler
- The CallCompositeEventHandler.
-
addOnIncomingCallCancelledEventHandler
void addOnIncomingCallCancelledEventHandler(CallCompositeEventHandler<CallCompositeIncomingCallCancelledEvent> handler)
Add on incoming call cancelled event handler CallCompositeEventHandler.
// add on incoming call cancelled event handler. callComposite.addOnIncomingCallCancelledEventHandler(event -> { // Process incoming call cancelled event System.out.println(event.getCallId()); });
- Parameters:
handler
- The CallCompositeEventHandler.
-
removeOnIncomingCallCancelledEventHandler
void removeOnIncomingCallCancelledEventHandler(CallCompositeEventHandler<CallCompositeIncomingCallCancelledEvent> handler)
Remove on incoming call cancelled event handler CallCompositeEventHandler.
- Parameters:
handler
- The CallCompositeEventHandler.
-
hold
CompletableFuture<Void> hold()
Hold call.
-
resume
CompletableFuture<Void> resume()
Resume call.
-
addOnDismissedEventHandler
void addOnDismissedEventHandler(CallCompositeEventHandler<CallCompositeDismissedEvent> handler)
Add CallCompositeEventHandler.
Add a callback for Call Composite dismissed Event.See com.azure.android.communication.ui.calling.models.CallCompositeErrorCode for values.
// add on dismissed event handler. callComposite.addOnDismissedEventHandler(event -> { });
- Parameters:
handler
- The CallCompositeEventHandler.
-
removeOnDismissedEventHandler
void removeOnDismissedEventHandler(CallCompositeEventHandler<CallCompositeDismissedEvent> handler)
Remove CallCompositeEventHandler.
Remove a callback for Call Composite dismissed Event.See CallCompositeDismissedEvent for values.
- Parameters:
handler
- The CallCompositeEventHandler.
-
addOnUserReportedEventHandler
void addOnUserReportedEventHandler(CallCompositeEventHandler<CallCompositeUserReportedIssueEvent> eventHandler)
Add CallCompositeEventHandler.
Add a callback for Call Composite User Reported Issue Event.See CallCompositeUserReportedIssueEvent for values.
// add on user reported event handler. callComposite.addOnUserReportedEventHandler(event -> { // Process user reported event System.out.println(event.getUserMessage()()); System.out.println(event.getScreenshot()()); DebugInfo info = event.getDebugInfo(); });
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
removeOnUserReportedEventHandler
void removeOnUserReportedEventHandler(CallCompositeEventHandler<CallCompositeUserReportedIssueEvent> handler)
Remove CallCompositeEventHandler.
Remove a callback for Call Composite user reported Event.See CallCompositeUserReportedIssueEvent for values.
- Parameters:
handler
- The CallCompositeEventHandler.
-
dismiss
void dismiss()
Dismiss composite. If call is in progress, user will leave a call.
-
addOnErrorEventHandler
void addOnErrorEventHandler(CallCompositeEventHandler<CallCompositeErrorEvent> errorHandler)
Add CallCompositeEventHandler.
Add a callback for Call Composite Error Events.See com.azure.android.communication.ui.calling.models.CallCompositeErrorCode for values.
// add error handler callComposite.addOnErrorEventHandler(event -> { // Process error event System.out.println(event.getCause()); System.out.println(event.getErrorCode()); });
- Parameters:
errorHandler
- The CallCompositeEventHandler.
-
removeOnErrorEventHandler
void removeOnErrorEventHandler(CallCompositeEventHandler<CallCompositeErrorEvent> errorHandler)
Remove CallCompositeEventHandler.
Remove a callback for Call Composite Error Events.See com.azure.android.communication.ui.calling.models.CallCompositeErrorEvent for values.
- Parameters:
errorHandler
- The CallCompositeEventHandler.
-
addOnCallStateChangedEventHandler
void addOnCallStateChangedEventHandler(CallCompositeEventHandler<CallCompositeCallStateChangedEvent> eventHandler)
Add on call state changed event handler CallCompositeEventHandler.
// add call state changed handler callComposite.addOnCallStateChangedEventHandler(event -> { // Use call composite call state });
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
removeOnCallStateChangedEventHandler
void removeOnCallStateChangedEventHandler(CallCompositeEventHandler<CallCompositeCallStateChangedEvent> eventHandler)
Remove on call state changed event handler CallCompositeEventHandler.
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
getCallState
CallCompositeCallStateCode getCallState()
Get Call State.
-
addOnAudioSelectionChangedEventHandler
void addOnAudioSelectionChangedEventHandler(CallCompositeEventHandler<CallCompositeAudioSelectionChangedEvent> eventHandler)
Add CallCompositeEventHandler.
Add a callback for Call Composite Audio Selection Changed Event.See com.azure.android.communication.ui.calling.models.CallCompositeAudioSelectionChangedEvent for values.
// add audio selection changed handler callComposite.addOnAudioSelectionChangedEventHandler(event -> { // Process audio selection changed event System.out.println(event.getSelectionType()); });
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
removeOnAudioSelectionChangedEventHandler
void removeOnAudioSelectionChangedEventHandler(CallCompositeEventHandler<CallCompositeAudioSelectionChangedEvent> eventHandler)
Remove CallCompositeEventHandler.
Remove a callback for Call Composite Audio Selection Changed Event.See com.azure.android.communication.ui.calling.models.CallCompositeAudioSelectionChangedEvent for values.
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
addOnRemoteParticipantJoinedEventHandler
void addOnRemoteParticipantJoinedEventHandler(CallCompositeEventHandler<CallCompositeRemoteParticipantJoinedEvent> eventHandler)
Add CallCompositeEventHandler.
// add remote participant joined handler callComposite.addOnRemoteParticipantJoinedEventHandler(event -> { // Use call composite to set configurations for remote participant });
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
removeOnRemoteParticipantJoinedEventHandler
void removeOnRemoteParticipantJoinedEventHandler(CallCompositeEventHandler<CallCompositeRemoteParticipantJoinedEvent> eventHandler)
Remove CallCompositeEventHandler.
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
addOnRemoteParticipantLeftEventHandler
void addOnRemoteParticipantLeftEventHandler(CallCompositeEventHandler<CallCompositeRemoteParticipantLeftEvent> eventHandler)
Add CallCompositeEventHandler.
// add remote participant left handler callComposite.addOnRemoteParticipantLeftEventHandler(event -> { // Use call composite to set configurations for remote participant });
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
removeOnRemoteParticipantLeftEventHandler
void removeOnRemoteParticipantLeftEventHandler(CallCompositeEventHandler<CallCompositeRemoteParticipantLeftEvent> eventHandler)
Remove CallCompositeEventHandler.
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
addOnPictureInPictureChangedEventHandler
void addOnPictureInPictureChangedEventHandler(CallCompositeEventHandler<CallCompositePictureInPictureChangedEvent> eventHandler)
-
removeOnPictureInPictureChangedEventHandler
void removeOnPictureInPictureChangedEventHandler(CallCompositeEventHandler<CallCompositePictureInPictureChangedEvent> eventHandler)
Remove CallCompositeEventHandler.
- Parameters:
eventHandler
- The CallCompositeEventHandler.
-
setRemoteParticipantViewData
CallCompositeSetParticipantViewDataResult setRemoteParticipantViewData(CommunicationIdentifier identifier, CallCompositeParticipantViewData participantViewData)
Set CallCompositeParticipantViewData.
Used to set Participant View Data (E.g. Avatar and displayName) to be used on this device only.
This should be called from addOnRemoteParticipantJoinedEventHandler to assign Participant View Data when a Participant joins the meeting if you'd like to modify theParticipants view data.
- Parameters:
identifier
- The CommunicationIdentifier.participantViewData
- The CallCompositeParticipantViewData.
-
getDebugInfo
CallCompositeDebugInfo getDebugInfo(Context context)
Get Call Composite Debug information.
-
bringToForeground
void bringToForeground(Context context)
Brings Call Composite to foreground if it was send to background by sendToBackground ot by user going back in navigation while on the call.
-
sendToBackground
void sendToBackground()
Hide call composite. If CallCompositeMultitaskingOptions is constructed withenableSystemPictureInPictureWhenMultitasking set to true, then Pip will be displayed.
-
handlePushNotification
CompletableFuture<Void> handlePushNotification(CallCompositePushNotification pushNotification)
Handle incoming call push notification.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
- Parameters:
pushNotification
- The CallCompositePushNotification.
-
registerPushNotification
CompletableFuture<Void> registerPushNotification(String deviceRegistrationToken)
RegisterPushNotification to receive incoming call notification.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
- Parameters:
deviceRegistrationToken
- The device registration token.
-
unregisterPushNotification
CompletableFuture<Void> unregisterPushNotification()
UnregisterPushNotification to stop receiving incoming call notification.Build CallCompositeBuilder using CommunicationTokenCredential and application Context .
-
-
-
-