次の方法で共有


Call Class

  • java.lang.Object
    • com.azure.android.communication.calling.Call

public class Call

Describes a call

Method Summary

Modifier and Type Method and Description
void addOnIdChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnIdChanged events. CallIdChanged Event. Occurs when the call id changes

void addOnIncomingAudioStateChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnIncomingAudioStateChanged events. This event is raised when Speaker is muted.

void addOnIsMutedChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnIsMutedChanged events.

void addOnLocalVideoStreamsUpdatedListener(LocalVideoStreamsUpdatedListener listener)

Adds the specified listener to receive OnLocalVideoStreamsUpdated events.

void addOnOutgoingAudioStateChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnOutgoingAudioStateChanged events. This event is raised when Call is muted.

void addOnRemoteParticipantsUpdatedListener(ParticipantsUpdatedListener listener)

Adds the specified listener to receive OnRemoteParticipantsUpdated events. ParticipantsUpdated Event. Occurs when participants are added to or removed from a call

void addOnRoleChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnRoleChanged events. CallRoleChanged Event. Occurs when the call role changes

void addOnStateChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnStateChanged events. StateChanged Event. Occurs when the call state changes

void addOnTotalParticipantCountChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnTotalParticipantCountChanged events. TotalParticipantCountChanged Event. Occurs when the participant count changes

RemoteParticipant addParticipant(com.azure.android.communication.common.CommunicationIdentifier participant)

Add participant to an existing call

RemoteParticipant addParticipant(com.azure.android.communication.common.PhoneNumberIdentifier participant, AddPhoneNumberOptions addPhoneNumberOptions)

Add a PSTN participant to an existing call with ability to specify an participant phone hnumber

<TCallFeature extends CallFeature> TCallFeature feature(CallFeatureFactory<TCallFeature> factory)

Retrieves an initialized and memoized Feature object with extended API. Check the object Features.* for all available extended call features in this package.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

IncomingAudioStream getActiveIncomingAudioStream()

Currently active incoming audio stream in the call

OutgoingAudioStream getActiveOutgoingAudioStream()

Currently active outgoing audio stream in the call

CallEndReason getCallEndReason()

Containing code/subcode indicating how a call has ended

CallerInfo getCallerInfo()

Gets the identity of the caller

CallLobby getCallLobby()

Get the Teams meeting lobby.

CallParticipantRole getCallParticipantRole()

Participant role in the call

CallDirection getDirection()

Outgoing or Incoming depending on the Call Direction

String getId()

Id of the call

LiveOutgoingAudioFilters getLiveOutgoingAudioFilters()

Get the current configurable outgoing audio filters

List<LocalVideoStream> getLocalVideoStreams()

Get a list of local video streams in the current call.

List<OutgoingVideoStream> getOutgoingVideoStreams()

Get a list of outgoing streams in the current call.

List<RemoteParticipant> getRemoteParticipants()

Get a list of remote participants in the current call. In case of calls with participants of hundred or more, only media active participants are present in this collection.

CallState getState()

Current state of the call

int getTotalParticipantCount()

Total number of participants active in the current call

CompletableFuture<Void> hangUp()

HangUp a call

CompletableFuture<Void> hangUp(final HangUpOptions options)

HangUp a call

CompletableFuture<Void> hold()

Hold this call

boolean isIncomingAudioMuted()

Whether the local speaker is muted or not.

boolean isMuted()

Whether the local microphone is muted or not.

boolean isOutgoingAudioMuted()

Whether the local microphone is muted or not.

CompletableFuture<Void> mute(final android.content.Context context)

Mute local microphone.

CompletableFuture<Void> muteIncomingAudio(final android.content.Context context)

Mute local speaker.

CompletableFuture<Void> muteOutgoingAudio(final android.content.Context context)

Mute local microphone.

void removeOnIdChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnIdChanged events. CallIdChanged Event. Occurs when the call id changes

void removeOnIncomingAudioStateChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnIncomingAudioStateChanged events. This event is raised when Speaker is muted.

void removeOnIsMutedChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnIsMutedChanged events.

void removeOnLocalVideoStreamsUpdatedListener(LocalVideoStreamsUpdatedListener listener)

Removes the specified listener to receive OnLocalVideoStreamsUpdated events.

void removeOnOutgoingAudioStateChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnOutgoingAudioStateChanged events. This event is raised when Call is muted.

void removeOnRemoteParticipantsUpdatedListener(ParticipantsUpdatedListener listener)

Removes the specified listener to receive OnRemoteParticipantsUpdated events. ParticipantsUpdated Event. Occurs when participants are added to or removed from a call

void removeOnRoleChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnRoleChanged events. CallRoleChanged Event. Occurs when the call role changes

void removeOnStateChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnStateChanged events. StateChanged Event. Occurs when the call state changes

void removeOnTotalParticipantCountChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnTotalParticipantCountChanged events. TotalParticipantCountChanged Event. Occurs when the participant count changes

CompletableFuture<Void> removeParticipant(final RemoteParticipant participant)

Remove a participant from a call

CompletableFuture<Void> resume()

Resume this call

CompletableFuture<Void> sendDtmf(final DtmfTone tone)

Send DTMF tone

CompletableFuture<Void> startAudio(final android.content.Context context, final CallAudioStream audioStream)

Start audio stream.

CompletableFuture<Void> startVideo(final android.content.Context context, final OutgoingVideoStream stream)

Start sharing video stream to the call.

CompletableFuture<Void> stopAudio(final android.content.Context context, final CallAudioStream audioStream)

Stop audio stream.

CompletableFuture<Void> stopVideo(final android.content.Context context, final OutgoingVideoStream stream)

Stop sharing video stream to the call.

CompletableFuture<Void> unmute(final android.content.Context context)

Unmute local microphone.

CompletableFuture<Void> unmuteIncomingAudio(final android.content.Context context)

Unmute local speaker.

CompletableFuture<Void> unmuteOutgoingAudio(final android.content.Context context)

Unmute local microphone.

Method Details

addOnIdChangedListener

public void addOnIdChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnIdChanged events. CallIdChanged Event. Occurs when the call id changes

Parameters:

listener

addOnIncomingAudioStateChangedListener

public void addOnIncomingAudioStateChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnIncomingAudioStateChanged events. This event is raised when Speaker is muted.

Parameters:

listener

addOnIsMutedChangedListener

public void addOnIsMutedChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnIsMutedChanged events.

Parameters:

listener

addOnLocalVideoStreamsUpdatedListener

public void addOnLocalVideoStreamsUpdatedListener(LocalVideoStreamsUpdatedListener listener)

Adds the specified listener to receive OnLocalVideoStreamsUpdated events.

Parameters:

listener

addOnOutgoingAudioStateChangedListener

public void addOnOutgoingAudioStateChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnOutgoingAudioStateChanged events. This event is raised when Call is muted.

Parameters:

listener

addOnRemoteParticipantsUpdatedListener

public void addOnRemoteParticipantsUpdatedListener(ParticipantsUpdatedListener listener)

Adds the specified listener to receive OnRemoteParticipantsUpdated events. ParticipantsUpdated Event. Occurs when participants are added to or removed from a call

Parameters:

listener

addOnRoleChangedListener

public void addOnRoleChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnRoleChanged events. CallRoleChanged Event. Occurs when the call role changes

Parameters:

listener

addOnStateChangedListener

public void addOnStateChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnStateChanged events. StateChanged Event. Occurs when the call state changes

Parameters:

listener

addOnTotalParticipantCountChangedListener

public void addOnTotalParticipantCountChangedListener(PropertyChangedListener listener)

Adds the specified listener to receive OnTotalParticipantCountChanged events. TotalParticipantCountChanged Event. Occurs when the participant count changes

Parameters:

listener

addParticipant

public RemoteParticipant addParticipant(com.azure.android.communication.common.CommunicationIdentifier participant)

Add participant to an existing call

Parameters:

participant - Identifier or the participant to add to the call

Returns:

a RemoteParticipant object representing the newly added participant

addParticipant

public RemoteParticipant addParticipant(com.azure.android.communication.common.PhoneNumberIdentifier participant, AddPhoneNumberOptions addPhoneNumberOptions)

Add a PSTN participant to an existing call with ability to specify an participant phone hnumber

Parameters:

participant - Identifier or the participant to add to the call
addPhoneNumberOptions - options bag containing caller alternate id

Returns:

a RemoteParticipant object representing the newly added participant

feature

public TCallFeature feature(CallFeatureFactory factory)

Retrieves an initialized and memoized Feature object with extended API. Check the object Features.* for all available extended call features in this package.

Parameters:

factory - The factory for the call feature constructor that provides an extended API.

finalize

protected void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

getActiveIncomingAudioStream

public IncomingAudioStream getActiveIncomingAudioStream()

Currently active incoming audio stream in the call

getActiveOutgoingAudioStream

public OutgoingAudioStream getActiveOutgoingAudioStream()

Currently active outgoing audio stream in the call

getCallEndReason

public CallEndReason getCallEndReason()

Containing code/subcode indicating how a call has ended

getCallerInfo

public CallerInfo getCallerInfo()

Gets the identity of the caller

getCallLobby

public CallLobby getCallLobby()

Get the Teams meeting lobby.

getCallParticipantRole

public CallParticipantRole getCallParticipantRole()

Participant role in the call

getDirection

public CallDirection getDirection()

Outgoing or Incoming depending on the Call Direction

getId

public String getId()

Id of the call

getLiveOutgoingAudioFilters

public LiveOutgoingAudioFilters getLiveOutgoingAudioFilters()

Get the current configurable outgoing audio filters

getLocalVideoStreams

public List getLocalVideoStreams()

Get a list of local video streams in the current call.

getOutgoingVideoStreams

public List getOutgoingVideoStreams()

Get a list of outgoing streams in the current call.

getRemoteParticipants

public List getRemoteParticipants()

Get a list of remote participants in the current call. In case of calls with participants of hundred or more, only media active participants are present in this collection.

getState

public CallState getState()

Current state of the call

getTotalParticipantCount

public int getTotalParticipantCount()

Total number of participants active in the current call

hangUp

public CompletableFuture hangUp()

HangUp a call

hangUp

public CompletableFuture hangUp(final HangUpOptions options)

HangUp a call

Parameters:

options - Options for call hangUp

hold

public CompletableFuture hold()

Hold this call

isIncomingAudioMuted

public boolean isIncomingAudioMuted()

Whether the local speaker is muted or not.

isMuted

public boolean isMuted()

Whether the local microphone is muted or not.

isOutgoingAudioMuted

public boolean isOutgoingAudioMuted()

Whether the local microphone is muted or not.

mute

public CompletableFuture mute(final android.content.Context context)

Mute local microphone.

Parameters:

context

muteIncomingAudio

public CompletableFuture muteIncomingAudio(final android.content.Context context)

Mute local speaker.

Parameters:

context

muteOutgoingAudio

public CompletableFuture muteOutgoingAudio(final android.content.Context context)

Mute local microphone.

Parameters:

context

removeOnIdChangedListener

public void removeOnIdChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnIdChanged events. CallIdChanged Event. Occurs when the call id changes

Parameters:

listener

removeOnIncomingAudioStateChangedListener

public void removeOnIncomingAudioStateChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnIncomingAudioStateChanged events. This event is raised when Speaker is muted.

Parameters:

listener

removeOnIsMutedChangedListener

public void removeOnIsMutedChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnIsMutedChanged events.

Parameters:

listener

removeOnLocalVideoStreamsUpdatedListener

public void removeOnLocalVideoStreamsUpdatedListener(LocalVideoStreamsUpdatedListener listener)

Removes the specified listener to receive OnLocalVideoStreamsUpdated events.

Parameters:

listener

removeOnOutgoingAudioStateChangedListener

public void removeOnOutgoingAudioStateChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnOutgoingAudioStateChanged events. This event is raised when Call is muted.

Parameters:

listener

removeOnRemoteParticipantsUpdatedListener

public void removeOnRemoteParticipantsUpdatedListener(ParticipantsUpdatedListener listener)

Removes the specified listener to receive OnRemoteParticipantsUpdated events. ParticipantsUpdated Event. Occurs when participants are added to or removed from a call

Parameters:

listener

removeOnRoleChangedListener

public void removeOnRoleChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnRoleChanged events. CallRoleChanged Event. Occurs when the call role changes

Parameters:

listener

removeOnStateChangedListener

public void removeOnStateChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnStateChanged events. StateChanged Event. Occurs when the call state changes

Parameters:

listener

removeOnTotalParticipantCountChangedListener

public void removeOnTotalParticipantCountChangedListener(PropertyChangedListener listener)

Removes the specified listener to receive OnTotalParticipantCountChanged events. TotalParticipantCountChanged Event. Occurs when the participant count changes

Parameters:

listener

removeParticipant

public CompletableFuture removeParticipant(final RemoteParticipant participant)

Remove a participant from a call

Parameters:

participant

resume

public CompletableFuture resume()

Resume this call

sendDtmf

public CompletableFuture sendDtmf(final DtmfTone tone)

Send DTMF tone

Parameters:

tone

startAudio

public CompletableFuture startAudio(final android.content.Context context, final CallAudioStream audioStream)

Start audio stream.

Parameters:

context
audioStream - Audio stream to start.

startVideo

public CompletableFuture startVideo(final android.content.Context context, final OutgoingVideoStream stream)

Start sharing video stream to the call.

Parameters:

context
stream - Local Video stream to be shared.

stopAudio

public CompletableFuture stopAudio(final android.content.Context context, final CallAudioStream audioStream)

Stop audio stream.

Parameters:

context
audioStream - Audio stream to stop.

stopVideo

public CompletableFuture stopVideo(final android.content.Context context, final OutgoingVideoStream stream)

Stop sharing video stream to the call.

Parameters:

context
stream - Local Video stream to be shared.

unmute

public CompletableFuture unmute(final android.content.Context context)

Unmute local microphone.

Parameters:

context

unmuteIncomingAudio

public CompletableFuture unmuteIncomingAudio(final android.content.Context context)

Unmute local speaker.

Parameters:

context

unmuteOutgoingAudio

public CompletableFuture unmuteOutgoingAudio(final android.content.Context context)

Unmute local microphone.

Parameters:

context

Applies to