Class CommonCall

  • Direct Known Subclasses:
    Call, TeamsCall

    public abstract class CommonCall
    extends Object
    Describes a common call
    • Method Detail

      • 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.
        Overrides:
        finalize in class Object
      • getType

        public CommunicationCallType getType()
        Informs how video frames will be available for encoding or decoding.
      • getRemoteParticipants

        public 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.
      • getId

        public String getId()
        Id of the call
      • getStartTime

        public Date getStartTime()
        Time the call was bootstrapped
      • getState

        public CallState getState()
        Current state of the call
      • getCallEndReason

        public CallEndReason getCallEndReason()
        Containing code/subcode indicating how a call has ended
      • getDirection

        public CallDirection getDirection()
        Outgoing or Incoming depending on the Call Direction
      • isOutgoingAudioMuted

        public boolean isOutgoingAudioMuted()
        Whether the local microphone is muted or not.
      • isIncomingAudioMuted

        public boolean isIncomingAudioMuted()
        Whether the local speaker is muted or not.
      • getCallerInfo

        public CallerInfo getCallerInfo()
        Gets the identity of the caller
      • getCallLobby

        public CallLobby getCallLobby()
        Get the Teams meeting lobby.
      • getActiveIncomingAudioStream

        public IncomingAudioStream getActiveIncomingAudioStream()
        Currently active incoming audio stream in the call
      • getActiveOutgoingAudioStream

        public OutgoingAudioStream getActiveOutgoingAudioStream()
        Currently active outgoing audio stream in the call
      • getCallParticipantRole

        public CallParticipantRole getCallParticipantRole()
        Participant role in the call
      • getOutgoingVideoStreams

        public List<OutgoingVideoStream> getOutgoingVideoStreams()
        Get a list of outgoing streams in the current call.
      • getTotalParticipantCount

        public int getTotalParticipantCount()
        Total number of participants active in the current call
      • getLiveOutgoingAudioFilters

        public LiveOutgoingAudioFilters getLiveOutgoingAudioFilters()
        Get the current configurable outgoing audio filters
      • addOnStartTimeUpdatedListener

        public void addOnStartTimeUpdatedListener​(PropertyChangedListener listener)
        Adds the specified listener to receive OnStartTimeUpdated events. Start time set event. Occurs when the call state is changed to connected.
      • removeOnStartTimeUpdatedListener

        public void removeOnStartTimeUpdatedListener​(PropertyChangedListener listener)
        Removes the specified listener to receive OnStartTimeUpdated events. Start time set event. Occurs when the call state is changed to connected.
      • addOnIdChangedListener

        public void addOnIdChangedListener​(PropertyChangedListener listener)
        Adds the specified listener to receive OnIdChanged events. CallIdChanged Event. Occurs when the call id changes
      • removeOnIdChangedListener

        public void removeOnIdChangedListener​(PropertyChangedListener listener)
        Removes the specified listener to receive OnIdChanged events. CallIdChanged Event. Occurs when the call id changes
      • addOnStateChangedListener

        public void addOnStateChangedListener​(PropertyChangedListener listener)
        Adds the specified listener to receive OnStateChanged events. StateChanged Event. Occurs when the call state changes
      • removeOnStateChangedListener

        public void removeOnStateChangedListener​(PropertyChangedListener listener)
        Removes the specified listener to receive OnStateChanged events. StateChanged Event. Occurs when the call state changes
      • addOnRoleChangedListener

        public void addOnRoleChangedListener​(PropertyChangedListener listener)
        Adds the specified listener to receive OnRoleChanged events. CallRoleChanged Event. Occurs when the call role changes
      • removeOnRoleChangedListener

        public void removeOnRoleChangedListener​(PropertyChangedListener listener)
        Removes the specified listener to receive OnRoleChanged events. CallRoleChanged Event. Occurs when the call role changes
      • 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
      • 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
      • addOnOutgoingAudioStateChangedListener

        public void addOnOutgoingAudioStateChangedListener​(PropertyChangedListener listener)
        Adds the specified listener to receive OnOutgoingAudioStateChanged events. OnOutgoingAudioStateChanged Event. Occurs when the call is muted
      • removeOnOutgoingAudioStateChangedListener

        public void removeOnOutgoingAudioStateChangedListener​(PropertyChangedListener listener)
        Removes the specified listener to receive OnOutgoingAudioStateChanged events. OnOutgoingAudioStateChanged Event. Occurs when the call is muted
      • addOnMutedByOthersListener

        public void addOnMutedByOthersListener​(PropertyChangedListener listener)
        Adds the specified listener to receive OnMutedByOthers events. OnMutedByOthers Event. Occurs when the another participant in the call has muted the current participant.
      • removeOnMutedByOthersListener

        public void removeOnMutedByOthersListener​(PropertyChangedListener listener)
        Removes the specified listener to receive OnMutedByOthers events. OnMutedByOthers Event. Occurs when the another participant in the call has muted the current participant.
      • addOnIncomingAudioStateChangedListener

        public void addOnIncomingAudioStateChangedListener​(PropertyChangedListener listener)
        Adds the specified listener to receive OnIncomingAudioStateChanged events. This event is raised when incoming audio state is changed.
      • removeOnIncomingAudioStateChangedListener

        public void removeOnIncomingAudioStateChangedListener​(PropertyChangedListener listener)
        Removes the specified listener to receive OnIncomingAudioStateChanged events. This event is raised when incoming audio state is changed.
      • addOnTotalParticipantCountChangedListener

        public void addOnTotalParticipantCountChangedListener​(PropertyChangedListener listener)
        Adds the specified listener to receive OnTotalParticipantCountChanged events. TotalParticipantCountChanged Event. Occurs when the participant count changes
      • removeOnTotalParticipantCountChangedListener

        public void removeOnTotalParticipantCountChangedListener​(PropertyChangedListener listener)
        Removes the specified listener to receive OnTotalParticipantCountChanged events. TotalParticipantCountChanged Event. Occurs when the participant count changes
      • muteAllRemoteParticipants

        public CompletableFuture<Void> muteAllRemoteParticipants()
        Mute all remote participants audio
      • sendDtmf

        public CompletableFuture<Void> sendDtmf​(DtmfTone tone)
        Send DTMF tone
      • hangUp

        public CompletableFuture<Void> hangUp​(HangUpOptions options)
        HangUp a call
        Parameters:
        options - Options for call hangUp
      • removeParticipant

        public CompletableFuture<Void> removeParticipant​(RemoteParticipant participant)
        Remove a participant from a call
        Parameters:
        participant - Options for call hangUp
      • hold

        public CompletableFuture<Void> hold()
        Hold this call
      • resume

        public CompletableFuture<Void> resume()
        Resume this call
      • setVideoConstraints

        public void setVideoConstraints​(VideoConstraints constraints)
        Set the constraints for outgoing and incoming video streams
      • hangUp

        public CompletableFuture<Void> hangUp()
        HangUp a call
      • mute

        @Deprecated
        public CompletableFuture<Void> mute​(Context context)
        Deprecated.
        Use muteOutgoingAudio instead
        Mute local microphone.
      • unmute

        @Deprecated
        public CompletableFuture<Void> unmute​(Context context)
        Deprecated.
        Use unMuteOutgoingAudio instead
        Unmute local microphone.
      • unmuteOutgoingAudio

        public CompletableFuture<Void> unmuteOutgoingAudio​(Context context)
        Unmute local microphone.
      • muteOutgoingAudio

        public CompletableFuture<Void> muteOutgoingAudio​(Context context)
        Mute local microphone.
      • unmuteIncomingAudio

        public CompletableFuture<Void> unmuteIncomingAudio​(Context context)
        Unmute local speaker.
      • muteIncomingAudio

        public CompletableFuture<Void> muteIncomingAudio​(Context context)
        Mute local speaker.
      • startVideo

        public CompletableFuture<Void> startVideo​(Context context,
                                                  OutgoingVideoStream stream)
        Start sharing video stream to the call.
        Parameters:
        stream - Local Video stream to be shared.
      • stopVideo

        public CompletableFuture<Void> stopVideo​(Context context,
                                                 OutgoingVideoStream stream)
        Stop sharing video stream to the call.
        Parameters:
        stream - Local Video stream to be shared.
      • startAudio

        public CompletableFuture<Void> startAudio​(Context context,
                                                  CallAudioStream audioStream)
        Start audio stream.
        Parameters:
        audioStream - Audio stream to start.
      • stopAudio

        public CompletableFuture<Void> stopAudio​(Context context,
                                                 CallAudioStream audioStream)
        Stop audio stream.
        Parameters:
        audioStream - Audio stream to stop.
      • feature

        public <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.
        Parameters:
        factory - The factory for the call feature constructor that provides an extended API.
      • setTelecomManagerAudioRoute

        public void setTelecomManagerAudioRoute​(int route)
        Sets the audio route (speaker, bluetooth, etc...). Tekes an effect when TelecomMangerOptions are set to CallAgentOptions.
        Parameters:
        route - – The audio route to use (one of android.telecom.CallAudioState.ROUTE_BLUETOOTH, CallAudioState.ROUTE_EARPIECE, CallAudioState.ROUTE_SPEAKER, or CallAudioState.ROUTE_WIRED_HEADSET).