STWCallManager

open class STWCallManager
STWCallManager

Public Class that manages all operations concerning VoIP calls in the Application. A VoIP call is an instance of STWVCall. VoIP call types can be :

See : STWVCall.STWVCallType. PTT Call includes channel sessions (See : isChannel) and emergency PTT calls (See : isEmergencyCall).

This class offers several possible operations defined in the following list:

  • Start a VoIP call
  • Receive a VoIP call
  • Accept a VoIP call
  • Reject a VoIP call
  • Stop a VoIP call
  • Invite users to join a PTT call
  • Connect to a channel>
  • Disconnect from a channel
  • Register for incoming sessions callbacks : IncomingSessionsListener
  • Register for session state callbacks (for a specific VoIP call, or for all VoIP calls) : SessionStateListener
  • Register for participant event callbacks (for a specific VoIP call, or for all VoIP calls) : SessionParticipantEventListener
  • Register for POC floor callbacks (for a specific VoIP call, or for all VoIP calls) : PocFloorControlEventListener
  • Register for cellular call callbacks : CellularCallListener
  • Register for audio focus callbacks : AudioFocusChangedListener
  • Example of use

    • 
      
       STWCallManager.getInstance().registerForCallEvents(new IncomingSessionsListener() {
      
                  public void onReceiveIncomingCall(STWVCall call)
                  {
      //Code...
                  }
      
                  public void onReceiveMissedCall(VoipSessionItem voipSessionItem)
                  {
      //Code...
                  }
              }, new SessionStateListener() {
      
                  public void calling(STWVCall vCall)
                  {
      //Code...
                  }
      
                  public void onSessionStarted(STWVCall sessionHolder)
                  {
      //Code...
                  }
      
                  public void inCall(STWVCall vCall)
                  {
      //Code...
                  }
      
                  public void onSessionConnected(STWVCall sessionHolder)
                  {
      //Code...
                  }
      
                  public void onSessionReconnecting(STWVCall sessionHolder)
                  {
      //Code...
                  }
      
                  public void onAllSessionsReconnecting()
                  {
      //Code...
                  }
      
                  public void onSessionOnHold(STWVCall sessionHolder)
                  {
      //Code...
                  }
      
                  public void onSessionResumed(STWVCall sessionHolder)
                  {
      //Code...
                  }
      
                  public void onQosChanged(STWVCall sessionHolder)
                  {
      //Code...
                  }
      
                  public void onSessionStopped(VoipSessionItem voipSessionItem)
                  {
      //Code...
                  }
      
                  public void onVoipSessionClosed(VoipSessionItem voipSessionItem)
                  {
      //Code...
                  }
      
                  public void onSessionAnsweredFromOtherDevice(String sessionIdentifier)
                  {
      //Code...
                  }
              }, new ParticipantEventListener() {
      
                  public void onParticipantJoined(STWVCall sessionHolder, String participant, @STWVCall.STWVCallParticipantType int participantType)
                  {
      //Code...
                  }
      
                  public void onParticipantLeft(STWVCall sessionHolder, String participant, @STWVCall.STWVCallParticipantType int participantType)
                  {
      //Code...
                  }
      
                  public void onParticipantRefused(STWVCall sessionHolder, String participant, @STWVCall.STWVCallParticipantType int participantType,
                                                   int participantState)
                  {
      //Code...
                  }
      
                  public void onParticipantReached(STWVCall sessionHolder)
                  {
      //Code...
                  }
      
                  public void onParticipantOnHold(STWVCall sessionHolder, String participant, @STWVCall.STWVCallParticipantType int participantType)
                  {
      //Code...
                  }
      
                  public void onParticipantResumed(STWVCall sessionHolder, String participant, @STWVCall.STWVCallParticipantType int participantType)
                  {
      //Code...
                  }
      
                  public void onParticipantConnected(STWVCall sessionHolder, String participant, @STWVCall.STWVCallParticipantType int participantType)
                  {
      //Code...
                  }
      
                  public void onParticipantReconnecting(STWVCall sessionHolder, String participant, @STWVCall.STWVCallParticipantType int participantType)
                  {
      //Code...
                  }
      
                  public void onParticipantInvited(String oldSessionId,
                                                   Map<@STWParticipantState Integer, ArrayList<PhoneItem>> participantMap,
                                                   STWVCall sessionHolder)
                  {
      //Code...
                  }
              }, new PocFloorEventListener() {
      
                  public void onNewFloorControlStatus(STWVCall sessionHolder, int pushButtonStatus)
                  {
      //Code...
                  }
      
                  public void onFloorControlRequest(STWVCall sessionHolder, int pushButtonStatus)
                  {
      //Code...
                  }
      
                  public void onFloorControlRelease(STWVCall sessionHolder, int pushButtonStatus)
                  {
      //Code...
                  }
      
                  public void onFloorControlGranted(STWVCall sessionHolder, int pushButtonStatus, boolean isRevokedFloor)
                  {
      //Code...
                  }
      
                  public void onFloorControlDeny(STWVCall sessionHolder, int pushButtonStatus)
                  {
      //Code...
                  }
      
                  public void onFloorControlIdle(STWVCall sessionHolder, int pushButtonStatus)
                  {
      //Code...
                  }
      
                  public void onFloorControlTaken(STWVCall sessionHolder, int pushButtonStatus, boolean isRevokedFloor,
                                                  String floorOwner, @STWPTTCall.STWVCallFloorOwnerType int floorOwnerType)
                  {
      //Code...
                  }
      
                  public void onFloorControlRevoke(STWVCall sessionHolder, int pushButtonStatus)
                  {
      //Code...
                  }
      
                  public void onNotifyUserTalkingInOtherChannel()
                  {
      //Code...
                  }
      
                  public void onActivePTTCallChanged()
                  {
      //Code...
                  }
              }, null);
      
      
    • 
      
       STWCallManager.getInstance().registerForCellularCallEvents(new CellularCallListener() {
      
                  public void onCellularCallStarted() {
      //Code...
                  }
      
                  public void onCellularCallEnded() {
      //Code...
                  }
      
                  public void onCellularCallMissed() {
      //Code...
                  }
              });
      
      
    • 
      
      STWCallManager.getInstance().registerForAudioFocusChanged(new AudioFocusChangedListener() {
      
                  public void onAudioFocusLoss() {
      //Code...
                  }
      
                  public void onAudioFocusGain() {
      //Code...
                  }
              });
      
      
  •     Call this method to check if voicemail is allowed.
        
    
        public boolean isVoiceMailAllowed(context)
        

Types

Link copied to clipboard
annotation class PTTAudioLatency
Link copied to clipboard
annotation class PTTAudioOutput

Functions

Link copied to clipboard
open fun acceptCall(    @NonNull context: Context,     @Nullable call: STWVCall,     @Nullable completion: CompletionCallback)
Call this method to accept an incoming VoIP call
Link copied to clipboard
open fun canChangeCallForwardSettings(@NonNull context: Context): Boolean
Call this method to check whether the user can customize call forwarding settings at the client side level
Link copied to clipboard
open fun checkUsbDeviceList()
Call this method to check if an USB Camera device is plugged when application is opened Note no need to use this method to check the UVc camera permission, when user try to stream from the UvcCamera the Voip stack will request the permission.
Link copied to clipboard
open fun containsCalls(): Boolean
Call this method to check if the call manager contains at least one VoIP call, no matter what type of session
Link copied to clipboard
open fun containsChannelCalls(): Boolean
Call this method to check if the call manager contains at least one Channel call
Link copied to clipboard
open fun containsConferenceCalls(): Boolean
Call this method to check if the call manager contains at least one Conference call
Link copied to clipboard
open fun containsEmergencyCalls(): Boolean
Call this method to check if the call manager contains at least one Emergency PTT call
Link copied to clipboard
open fun containsLiveCalls(): Boolean
Call this method to check if the call manager contains at least one live call (free call or call out)
Link copied to clipboard
open fun containsLiveOrVideoCall(): Boolean
Call this method to check if the call manager contains at least one Live or Video call, no matter if exist PTT or Channel or live stream call
Link copied to clipboard
open fun containsLiveStreamCall(): Boolean
Call this method to check if the call manager contains at least one live stream call
Link copied to clipboard
open fun containsLiveVideoCalls(): Boolean
Call this method to check if the call manager contains at least one live video call
Link copied to clipboard
open fun containsVoipCalls(): Boolean
Call this method to check if the call manager contains at least one VoIP call other than channel or live stream
Link copied to clipboard
open fun containsWalkieTalkieCalls(): Boolean
Call this method to check if the call manager contains at least one PTT or Channel call
Link copied to clipboard
open fun enableHeadSetCompatibilityMode(@NonNull context: Context, enabled: Boolean)
Call this method to change the headset compatibility mode option.
Link copied to clipboard
open fun enablePTTVoiceQualityOption(@NonNull context: Context, enabled: Boolean)
Call this method to change the PTT voice quality option.
Link copied to clipboard
open fun enableVoIPAlwaysConnectedMode(    @NonNull context: Context,     enable: Boolean,     @Nullable callback: STWCallSettingRequestCallback)
send request Settings with the new value for activation/deactivation feature VoIP ACM on client side
open fun existActiveAudioAmbientListeningByThreadGroupId(@Nullable threadGroupId: String): Boolean
Call this method to find out whether there is an active audio AmbientListening call related to the given thread.
open fun existActiveAudioConferenceByThreadGroupId(@Nullable threadGroupId: String): Boolean
Call this method to find out whether there is an active audio conference call related to the given thread.
open fun existActivePrearrangedPTTGroupCallByContactGroupId(@NonNull context: Context, @Nullable contactGroupId: String): Boolean
Call this method to find out whether there is an active PTT group call related to the given contact
Link copied to clipboard
open fun existActivePTTGroupCallByThreadGroupId(@Nullable threadGroupId: String): Boolean
Call this method to find out whether there is an active PTT group call related to the given thread.
Link copied to clipboard
open fun existActiveSession(): Boolean
Call this method to check if there is a voip session
Link copied to clipboard
open fun existOngoingCellularCall(): Boolean
Call this method to check if exist an ongoing cellular call
Link copied to clipboard
open fun getActiveAudioConferenceByThreadGroupId(@Nullable threadGroupId: String): STWVCall
Call this method to find out whether there is an active audio conference call related to the given thread.
Link copied to clipboard
open fun getActiveCall(): STWVCall
Call this method to get the active call to be handled by hardware button actions
Link copied to clipboard
open fun getActiveCallForwardingType(@NonNull context: Context): Int
Call this method to get the active call forwarding type
Link copied to clipboard
open fun getActiveCallID(): String
Call this method to get the active call id
Link copied to clipboard
open fun getActivePTTGroupCallByThreadGroupId(@Nullable threadGroupId: String): STWVCall
Call this method to find out whether there is an active PTT group call related to the given thread.
Link copied to clipboard
open fun getActiveVoipSessionByThreadId(@NonNull context: Context, @Nullable threadId: String): VoipSessionItem
Call this method to retrieve, if exist, an ongoing VoIP session related to a specific conversation Note that : this method has access to database, so it is better to minimize calls to this method from UI thread
Link copied to clipboard
open fun getAllAmbientListeningCalls(): List<STWVCall>
Call this method to get all current AmbientListening calls
Link copied to clipboard
open fun getAllCalls(): List<STWVCall>
Call this method to get all current calls
Link copied to clipboard
open fun getAllCallsWithStatus(callStatus: Int): List<STWVCall>
Call this method to get all current calls with specific STWVCall.STWVCallConnectionStatus
Link copied to clipboard
open fun getAllChannelCalls(): List<STWPTTCall>
Call this method to get all current channel calls
Link copied to clipboard
open fun getAllChannelIds(    @NonNull context: Context,     activeFirst: Boolean,     activeChannelOrderedByLevel: Boolean): List<Integer>
Call this method to retrieve the channels IDs By default, channels are ordered by name.
Link copied to clipboard
open fun getAllChannelListBySelection(@NonNull context: Context, @Nullable searchKey: String): List<VoipChannelItem>
Call this method to retrieve the list of all VoipChannelItem where name contains user's input search
Link copied to clipboard
open fun getAllConferenceCalls(): List<STWVCall>
Call this method to get all current conference calls
Link copied to clipboard
open fun getAllEmergencyCalls(): List<STWVCall>
Call this method to get all incoming/outgoing emergency calls
Link copied to clipboard
open fun getAllLiveAudioCalls(): List<STWVCall>
Call this method to get all current live audio calls
Link copied to clipboard
open fun getAllLiveVideoCalls(): List<STWVCall>
Call this method to get all current live video calls
Link copied to clipboard
open fun getAllLiveVideoStreaming(): List<STWVCall>
Call this method to get all incoming/outgoing video streaming calls
Link copied to clipboard
open fun getAllPTTCalls(): List<STWPTTCall>
Call this method to get all current PTT calls
Link copied to clipboard
open fun getAllVoipCalls(): List<STWVCall>
Call this method to get all current VoIP call other than channel and live stream
Link copied to clipboard
open fun getAllVoipChannels(    @NonNull context: Context,     activeFirst: Boolean,     activeChannelOrderedByLevel: Boolean): List<VoipChannelItem>
Call this method to retrieve the list of all VoipChannelItem.
Link copied to clipboard
open fun getAllVoipSessionByThreadId(    @NonNull context: Context,     @Nullable threadID: String,     @Nullable sessionTypes: List<Integer>,     @Nullable mediaTypes: List<Integer>,     @IntRange(from = 0) startingFrom: Int,     @IntRange(from = 1) numberOfMessage: Int): List<VoipSessionItem>
Call this method to retrieve a list of VoipSessionItem linked to a specific com.streamwide.smartms.lib.core.data.item.ThreadItem
Link copied to clipboard
open fun getAnonymousCallOutAllowedPrefixes(@NonNull context: Context): List<String>
Retrieve Anonymous call out prefixes
Link copied to clipboard
open fun getAudioCaptureSessionIds(): List<Integer>
Call this method to retrieve the audio capture session ids of this existing Calls
Link copied to clipboard
Call this method to get the default profile call forwarding settings
Link copied to clipboard
Call this method to get the user call forwarding settings
Link copied to clipboard
open fun getCallWithID(@NonNull callId: String): STWVCall
Call this method to get a VoIP call with specified callID
Link copied to clipboard
open fun getChannelTailTimeValue(@NonNull context: Context): Long
Call this method to get channel tail time value
Link copied to clipboard
open fun getHeadsetAudioPlayGain(@NonNull context: Context): Int
Call this method to get value of the audio play gain for headset output
Link copied to clipboard
open fun getInstance(): STWCallManager
Get or create the single instance of STWCallManager.
Link copied to clipboard
open fun getLastVoipSessionByMessageId(@NonNull context: Context, @Nullable voipMessageId: String): VoipSessionItem
Call this method to retrieve the last VoipSessionItem linked to a specific VoipMessageNote that : this method has access to database, so it is better to minimize calls to this method from UI thread
Link copied to clipboard
open fun getMainChannelForChannelDivisionFeature(@NonNull context: Context): String
Gets the configured main channel
Link copied to clipboard
open fun getMainSideForChannelDivisionFeature(@NonNull context: Context): Int
Gets the current configured channel division, it could be Left or right ear Channel division
Link copied to clipboard
open fun getNumberOfAllVoipSessionItemsByType(    @NonNull context: Context,     @Nullable threadID: String,     @Nullable messageTypeList: List<Integer>,     @NonNull sessionTypes: List<Integer>): Int
Call this method to retrieve the total number of all voip session items by type from local Database.
open fun getNumberOfUnreadVoipSessionByConversationId(@NonNull context: Context, @NonNull conversationId: String): Int
Call this method to retrieve the number of unread missed VoIP session related to a specific conversation.
Link copied to clipboard
open fun getOngoingActiveSession(): STWVCall
Call this method to get the current active call ignoring the Live stream call
Link copied to clipboard
open fun getOngoingVideoSession(): STWVCall
Call this method to get the current active session if exist and the media type is AudioVideo or Video
Link copied to clipboard
open fun getOrganizationPriorityMaxLevels(@NonNull context: Context): Long
get The maximum number of priority levels allowed in the organization The maximum number of priority levels allowed in the organization (0 when walkie-talkie is not allowed or priority feature is not allowed)
open fun getOrganizationWalkieTalkieSupervisoryMaxLevels(@NonNull context: Context): Long
get The maximum number of supervisory override priority levels allowed in the organization The maximum number of supervisory override priority levels allowed in the organization (0 when walkie-talkie is not allowed or supervisory override feature is not allowed).
Link copied to clipboard
open fun getPTTDefaultAudioLatency(@NonNull context: Context): Int
Call this method to check the default audio latency for PTT VoIP calls (DEFAULT or AAUDIO) Note that: OPENSLES is Deprecated and should not be used, otherwise the audio Latency will be forced toDEFAULT
Link copied to clipboard
open fun getPTTDefaultAudioOutput(@NonNull context: Context): Int
Call this method to check the default audio output for PTT VoIP calls (SPEAKER or EARPIECE)
Link copied to clipboard
open fun getRecentChannelIds(    @NonNull context: Context,     activeFirst: Boolean,     activeChannelOrderedByLevel: Boolean): List<Integer>
Call this method to retrieve the list of recent active channels IDs.
Link copied to clipboard
open fun getRecentChannelListBySelection(@NonNull context: Context, @Nullable searchKey: String): List<VoipChannelItem>
Call this method to retrieve the list of recent active VoipChannelItem where name contains user's input search
Link copied to clipboard
open fun getRecentVoipChannels(    @NonNull context: Context,     activeFirst: Boolean,     activeChannelOrderedByLevel: Boolean): List<VoipChannelItem>
Call this method to retrieve the list of recent active VoipChannelItem.
Link copied to clipboard
open fun getSpeakerAudioPlayGain(@NonNull context: Context): Int
Call this method to get value of the audio play gain for speaker output
Link copied to clipboard
open fun getUserVideoProfile(): Int
Link copied to clipboard
open fun getVideoConferencingUrl(    @NonNull context: Context,     @NonNull threadId: String,     @Nullable conferencingUrlCallback: STWConferencingUrlCallback): AsyncTask<String, Void, String>
Load the Video Conferencing Url asynchronously
Link copied to clipboard
open fun getVideoFramerateDefault(): Int
Call this method to get the default video frame rate from stack
Link copied to clipboard
open fun getVideoResolutionDefault(): Size
Call this method to get the default video resolution from stack
Link copied to clipboard
open fun getVideoStreamingMaxRecipient(@NonNull context: Context): Long
Link copied to clipboard
open fun getVoipChannelByGroupId(@NonNull context: Context, @NonNull groupId: String): VoipChannelItem
Call this method to retrieve VoipChannelItem given a contact group ID
Link copied to clipboard
open fun getVoipSessionById(@NonNull context: Context, @NonNull voipSessionId: String): VoipSessionItem
Call this method to retrieve VoipSessionItem related to a specific identifier Note that : this method has access to database, so it is better to minimize calls to this method from UI thread
Link copied to clipboard
open fun getVoipSessionByVoipMessageId(@NonNull context: Context, @Nullable voipMessageId: String): List<VoipSessionItem>
Call this method to retrieve a list of VoipSessionItem linked to a specific VoipMessage
Link copied to clipboard
open fun getVoipStackVersionAndRevision(): String
Call this method to check version and revision of current VoIP stack used in SDK
Link copied to clipboard
open fun iAmTalkinginPTTSession(): Boolean
Call this method to check if exist walkie talkie session i m talking
Link copied to clipboard
open fun inviteNewParticipants(    @NonNull context: Context,     @Nullable users: Array<String>,     @Nullable externalUsers: Array<String>,     @Nullable threadName: String,     @NonNull call: STWVCall,     @Nullable completion: CompletionCallback)
Call this method to invite new participant to a PTT call
Link copied to clipboard
open fun isAudioCaptureSessionIdsAvailable(): Boolean
Call this method to check if the audio capture session ids are available to be retrieved
Link copied to clipboard
open fun isAudioPlayLoudnessGainAdjustable(): Boolean
Call this method to check if audio play loundness gain can be adjusted in current device
Link copied to clipboard
open fun isBluetoothWithAudioOutputConnected(): Boolean
Call this method to check whether a bluetooth device with audio output is connected or not.
Link copied to clipboard
open fun isCallForwardAllowed(@NonNull context: Context): Boolean
Call this method to check whether the Call Forward feature is allowed or not
Link copied to clipboard
open fun isCallOutAllowed(@NonNull context: Context): Boolean
Call this method to check if call out is allowed
Link copied to clipboard
open fun isCallTransferEnabled(@NonNull context: Context): Boolean
Call this method to check if Call Transfer feature is allowed
Link copied to clipboard
open fun isCellularCallAllowed(@NonNull context: Context): Boolean
Call this method to check if cellular call option is allowed to be displayed from application
Link copied to clipboard
open fun isChannelDenyToTransmit(@NonNull context: Context, @NonNull groupId: String): Boolean
Link copied to clipboard
open fun isChannelLinkedToExternalChannel(@NonNull context: Context, @Nullable callId: String): Boolean
Call this method to to find out whether there is an external channel linked to the channel with the given call ID
Link copied to clipboard
open fun isChannelReachBackRequestAllowed(@NonNull context: Context): Boolean
Call this method to check if Channel reach back request is allowed or not
Link copied to clipboard
open fun isChannelsAllowed(@NonNull context: Context): Boolean
Call this method to check if Channel is allowed
Link copied to clipboard
open fun isChannelTailTimeEnabled(@NonNull context: Context): Boolean
Call this method to check if Channel tail Time is allowed
Link copied to clipboard
open fun isConferenceCallAllowed(@NonNull context: Context): Boolean
Call this method to check if Conference call is allowed
Link copied to clipboard
open fun isForcedStartChannelAllowed(@NonNull context: Context): Boolean
Call this method to check if the restart of active channels after closing the app is allowed
Link copied to clipboard
open fun isHeadSetCompatibilityModeEnabled(@NonNull context: Context): Boolean
Call this method to check whether the headset compatibility mode option is enabled or not
Link copied to clipboard
open fun isHeadsetPlugged(): Boolean
Call this method to check whether a wired headset is connected or not.
open fun isHeadsetPluggedOrBluetoothDeviceConnected(): Boolean
Call this method to check if a wired headset is plugged or if a bluetooth device with audio output is connected
Link copied to clipboard
open fun isMultiChannelAllowed(@NonNull context: Context): Boolean
Call this method to check if the user is allowed to use multi channel feature
Link copied to clipboard
open fun isPTTVoiceQualityOptionEnabled(@NonNull context: Context): Boolean
Call this method to check if the PTT voice quality option is enabled or not
Link copied to clipboard
open fun isReachBackRequestAllowed(@NonNull context: Context): Boolean
Call this method to check if reach back request is allowed or not
Link copied to clipboard
open fun isShareVideoStreamingAllowed(@NonNull context: Context): Boolean
Call this method to check if Live streaming call with other users is allowed
Link copied to clipboard
open fun isUseTCPFromStartEnabled(): Boolean
Call this method to check if the force use of TCP from start is enabled or not
Link copied to clipboard
open fun isVideoStreamingToDispatchersAllowed(@NonNull context: Context): Boolean
Call this method to check if Live streaming call to dispatcher is allowed
Link copied to clipboard
open fun isVoiceMailAllowed(@NonNull context: Context): Boolean
Call this method to check whether the Voice Mail feature is allowed or not
Link copied to clipboard
open fun isVoipAlwaysConnectedAllowed(@NonNull context: Context): Boolean
Call this method to check whether the VoIP Always Connected Mode feature (VoIP ACM) is enabled in back-end or not is enabled or not
Link copied to clipboard
open fun isVoipAlwaysConnectedModeEnabled(@NonNull context: Context): Boolean
Call this method if the VoIP Always Connected is enabled locally or not
Link copied to clipboard
open fun isVoipCallAllowed(@NonNull context: Context): Boolean
Call this method to check if Live call is allowed
Link copied to clipboard
open fun isVoipVideoCallAllowed(@NonNull context: Context): Boolean
Call this method to check if Live video call is allowed
Link copied to clipboard
open fun isWalkieTalkieAllowed(@NonNull context: Context): Boolean
Call this method to check if PTT call is allowed
Link copied to clipboard
open fun joinAudioConferenceCall(    @NonNull context: Context,     @NonNull threadId: String,     @Nullable completion: CompletionCallback)
Call this method to join an audio conference call from existing conversation
Link copied to clipboard
open fun joinPTTCall(    @NonNull context: Context,     @NonNull threadId: String,     @Nullable completion: CompletionCallback)
Call this method to start a new PTT call from existing conversation
Link copied to clipboard
open fun mergeCalls(    @NonNull context: Context,     @NonNull sessionIdList: List<String>,     @NonNull threadName: String,     @Nullable completion: CompletionCallback)
Call this method to merge two voip/call-in/Call-out calls
Link copied to clipboard
open fun needChangeVolumeControlToStreamVoiceCall(): Boolean
Call this method to check if Volume Control Stream should be set to STREAM_VOICE_CALL from displayed activity Note that : By default, for PTT VoIP calls, audio mode used is MODE_NORMAL.
Link copied to clipboard
open fun outgoingEmergencyAmbientListeningCalls(): List<STWVCall>
Call this method to get all the outgoing emergency Ambient Listening calls
Link copied to clipboard
open fun outgoingEmergencyCalls(): List<STWVCall>
Call this method to get all the outgoing emergency calls
Link copied to clipboard
open fun redirectAudioOutputToBluetooth()
open fun redirectAudioOutputToBluetooth(@NonNull callId: String)
Call this method to change audio output in bluetooth device
Link copied to clipboard
open fun redirectAudioOutputToEarpieceOrHeadset()
open fun redirectAudioOutputToEarpieceOrHeadset(@NonNull callId: String)
Call this method to change audio output in earpiece or headsetNote that : system not authorize headset and earpiece at the same time.
Link copied to clipboard
open fun redirectAudioOutputToSpeaker()
open fun redirectAudioOutputToSpeaker(@NonNull callId: String)
Call this method to change audio output in loud speaker
Link copied to clipboard
open fun refuseVoipCall(    @NonNull context: Context,     @Nullable call: STWVCall,     reason: Int)
Call this method to refuse an incoming VoIP call
Link copied to clipboard
open fun registerCallForwardingChangedEvents(@Nullable callForwardingCallback: STWCallForwardingChangedListener)
Call this method to register for events related to call forwarding settings changes
Link copied to clipboard
open fun registerDispatcherReachBackListener(@NonNull listener: DispatcherReachBackListener, @Nullable sessionId: String)
Register the listener to handle PTT reach back response
Link copied to clipboard
open fun registerForAudioFocusChanged(@NonNull audioFocusChangedListener: AudioFocusChangedListener)
Call this method to register for events related to audio focus
Link copied to clipboard
open fun registerForCallEvents(    @Nullable incomingSessionsListener: IncomingSessionsListener,     @Nullable stateListener: SessionStateListener,     @Nullable participantEventListener: ParticipantEventListener,     @Nullable pocFloorEventListener: PocFloorEventListener,     @Nullable sessionId: String)
Call this method to register for events related to VoIP sessions.
Link copied to clipboard
open fun registerForCellularCallEvents(@NonNull cellularCallListener: CellularCallListener)
Call this method to register for events related to cellular calls
Link copied to clipboard
open fun registerForIncomingSessionsEvents(@Nullable incomingSessionsListener: IncomingSessionsListener)
Call this method to register for events related to the incoming VoIP session
Link copied to clipboard
open fun registerForPocFloorControlEvents(@Nullable pocFloorControlEventListener: PocFloorControlEventListener, @Nullable sessionId: String)
Call this method to register for events related to the poc floor control events
Link copied to clipboard
open fun registerForReachBackRequestChanged(@NonNull stwReachBackRequestFeatureChangedListener: STWReachBackRequestFeatureChangedListener)
Call this method to register for events related to reach back request feature
Link copied to clipboard
open fun registerForRequestPermission(@Nullable listener: STWRequestPermissionListener)
Register to the listener to handle required permissions.
Link copied to clipboard
open fun registerForSessionEvents(    @Nullable incomingSessionsListener: IncomingSessionsListener,     @Nullable stateListener: SessionStateListener,     @Nullable sessionParticipantEventListener: SessionParticipantEventListener,     @Nullable pocFloorControlEventListener: PocFloorControlEventListener,     @Nullable sessionId: String)
Call this method to register for events related to VoIP sessions
Link copied to clipboard
open fun registerForSessionParticipantEvents(@Nullable sessionParticipantEventListener: SessionParticipantEventListener, @Nullable sessionId: String)
Call this method to register for events related to participant state
Link copied to clipboard
open fun registerForSessionStateEvents(@Nullable stateListener: SessionStateListener, @Nullable sessionId: String)
Call this method to register for events related to the session state
Link copied to clipboard
open fun registerForTransferringSessionEvents(@Nullable sessionTransferListener: SessionTransferListener, @Nullable sessionId: String)
Call this method to register for events related to VoIP sessions transfer
Link copied to clipboard
open fun registerForUpdateSessionEvent(@NonNull sessionUpdateListener: SessionUpdateListener, @NonNull sessionId: String)
Call this method to register for events related to session update
Link copied to clipboard
open fun registerForVoipFeatureChanged(@NonNull voipFeaturesChangedListener: VoipFeaturesChangedListener)
Call this method to register for events related to VoIP features changes (VoIP feature becomes allowed / not allowed)
Link copied to clipboard
open fun registerForVolumeControl(@NonNull volumeControlListener: STWVolumeControlListener)
Call this method to register for callbacks when volume control stream is recommended to be changed Note that : By default, for PTT VoIP calls, audio mode used is MODE_NORMAL.
Link copied to clipboard
open fun registerVoIPACMServiceListener(@NonNull listener: STWServiceListener)
Register the listener to handle VoIP ACM service events.
Link copied to clipboard
open fun registerVoIPServiceListener(@NonNull listener: STWServiceListener)
Register the listener to handle VoIP service events.
Link copied to clipboard
open fun setActiveCall(@NonNull vCall: STWVCall): Boolean
Call this method to set the active call to be handled by hardware button actions
open fun setConfigurationForChannelDivisionFeature(    @NonNull context: Context,     channelDivision: Int,     @Nullable channelID: String)
Call this method to configure the Ability to play 2 simultaneous Channel audio flows : one flow in the right one flow in the left.
Link copied to clipboard
open fun setHeadsetAudioPlayGain(@NonNull context: Context, volume: Int)
Call this method to change the value of the audio play gain for headset output
Link copied to clipboard
open fun setLowVideoFramerate(videoQualityConfig: Int, divisor: Int)
Call this method to set low video frame rate according to the profile
Link copied to clipboard
open fun setLowVideoResolution(videoQualityConfig: Int, divisor: Int)
Call this method to set the new low video resolution
Link copied to clipboard
open fun setPTTDefaultAudioLatency(@NonNull context: Context, option: Int)
Call this method to choose whether you want play the PTT and channel audio latency on default or opensles or aAudio
Link copied to clipboard
open fun setPTTDefaultAudioOutput(@NonNull context: Context, option: Int)
Call this method to choose whether you want play the PTT and channel audio output on speaker or earpiece device
Link copied to clipboard
open fun setSpeakerAudioPlayGain(@NonNull context: Context, volume: Int)
Call this method to change the value of the audio play gain for speaker output
Link copied to clipboard
open fun setUserVideoProfile(value: Int)
Link copied to clipboard
open fun startCallOut(    @NonNull context: Context,     @NonNull user: String,     @Nullable completion: CompletionCallback)
open fun startCallOut(    @NonNull context: Context,     @NonNull user: String,     isAnonymous: Boolean,     @Nullable completion: CompletionCallback)
Call this method to start a new call out
Link copied to clipboard
open fun startChannelCall(    @NonNull context: Context,     @NonNull channelSessionID: String,     @Nullable completion: CompletionCallback)
open fun startChannelCall(    @NonNull context: Context,     @NonNull channelSessionID: String,     isVisitorChannel: Boolean,     @Nullable completion: CompletionCallback)
Call this method to connect to a channel
Link copied to clipboard
open fun startConferenceCall(    @NonNull context: Context,     @NonNull threadId: String,     priority: Int,     forOnlyAvailbaleRecipients: Boolean,     @Nullable completion: CompletionCallback)
Call this method to start a new Conference call from existing conversation
open fun startConferenceCall(    @NonNull context: Context,     @NonNull users: Array<String>,     @NonNull threadName: String,     priority: Int,     forOnlyAvailbaleRecipients: Boolean,     @Nullable completion: CompletionCallback)
Call this method to start a new Conference call with users
Link copied to clipboard
open fun startFreeCall(    @NonNull context: Context,     @NonNull user: String,     priority: Int,     @Nullable completion: CompletionCallback)
Call this method to start a new audio VoIP call
Link copied to clipboard
open fun startLiveStreamingCall(    @NonNull context: Context,     @Nullable users: Array<String>,     priority: Int,     @Nullable completion: CompletionCallback)
Call this method to start a new live streaming call
Link copied to clipboard
open fun startPTTCall(    @NonNull context: Context,     @NonNull threadId: String,     priority: Int,     forOnlyAvailbaleRecipients: Boolean,     floorRequestOnInvite: Boolean,     @Nullable completion: CompletionCallback)
Call this method to start a new PTT call from existing conversation
open fun startPTTCall(    @NonNull context: Context,     @NonNull users: Array<String>,     @NonNull threadName: String,     priority: Int,     forOnlyAvailbaleRecipients: Boolean,     floorRequestOnInvite: Boolean,     @Nullable completion: CompletionCallback)
Call this method to start a new PTT call with users
Link copied to clipboard
open fun startVideoCall(    @NonNull context: Context,     @NonNull user: String,     priority: Int,     @Nullable completion: CompletionCallback)
Call this method to start a new video call
Link copied to clipboard
open fun stopAllCalls(@NonNull context: Context)
Call this method to stop all current VoIP calls Note that : ALL VoIP sessions will be stopped (even an auto-connect channel session)
Link copied to clipboard
open fun stopCall(@NonNull context: Context, @Nullable call: STWVCall)
Call this method to stop a VoIP call Note that : an auto-connect channel can not be stopped when user availability is ON Duty
Link copied to clipboard
open fun stopCalls(@NonNull context: Context, @NonNull calls: List<STWVCall>)
Call this method to stop list of VoIP calls Note that : an auto-connect channel can not be stopped when user availability is ON Duty
Link copied to clipboard
open fun transferCall(    @NonNull context: Context,     @Nullable user: String,     @NonNull call: STWVCall,     @Nullable completion: CompletionCallback)
Call this method to transfer an ongoing live call (1 to 1) to a new user
Link copied to clipboard
open fun transferCallToExternal(    @NonNull context: Context,     @Nullable user: String,     @NonNull call: STWVCall,     isAnonymous: Boolean,     @Nullable completion: CompletionCallback)
Call this method to transfer an ongoing live call (1 to 1) to an external user
Link copied to clipboard
open fun unregisterCallForwardingChangedEvents(@Nullable callForwardingCallback: STWCallForwardingChangedListener)
Call this method to unregister for events related to call forwarding settings changes
Link copied to clipboard
open fun unregisterDispatcherReachBackListener(@NonNull listener: DispatcherReachBackListener)
Unregister the PTT dispatcher reach back listener
Link copied to clipboard
open fun unregisterForAudioFocusChanged(@NonNull audioFocusChangedListener: AudioFocusChangedListener)
Call this method to unregister from events related to audio focus
Link copied to clipboard
open fun unregisterForCallEvents(    @Nullable incomingSessionsListener: IncomingSessionsListener,     @Nullable stateListener: SessionStateListener,     @Nullable participantEventListener: ParticipantEventListener,     @Nullable pocFloorEventListener: PocFloorEventListener)
Call this method to unregister from events related to VoIP sessions
Link copied to clipboard
open fun unregisterForCellularCallEvents(@NonNull cellularCallListener: CellularCallListener)
Call this method to unregister from events related to cellular calls
Link copied to clipboard
open fun unregisterForIncomingSessionsEvents(@Nullable incomingSessionsListener: IncomingSessionsListener)
Call this method to unregister from events related to the incoming VoIP session
Link copied to clipboard
open fun unregisterForPocFloorControlEvents(@Nullable pocFloorControlEventListener: PocFloorControlEventListener)
Call this method to unregister from events related to the poc floor control events
Link copied to clipboard
open fun unregisterForReachBackRequestChanged(@NonNull stwReachBackRequestFeatureChangedListener: STWReachBackRequestFeatureChangedListener)
Call this method to unregister from events related to reach back request feature
Link copied to clipboard
open fun unregisterForRequestPermission(@Nullable listener: STWRequestPermissionListener)
Unregister form the previous listener
Link copied to clipboard
open fun unregisterForSessionEvents(    @Nullable incomingSessionsListener: IncomingSessionsListener,     @Nullable stateListener: SessionStateListener,     @Nullable sessionParticipantEventListener: SessionParticipantEventListener,     @Nullable pocFloorControlEventListener: PocFloorControlEventListener)
Call this method to unregister from events related to VoIP sessions
Link copied to clipboard
open fun unregisterForSessionParticipantEvents(@Nullable sessionParticipantEventListener: SessionParticipantEventListener)
Call this method to unregister from events related to participant state
Link copied to clipboard
open fun unregisterForSessionStateEvents(@Nullable stateListener: SessionStateListener)
Call this method to unregister from events related to the session state
Link copied to clipboard
open fun unregisterForTransferringSessionEvents(@Nullable sessionTransferListener: SessionTransferListener)
Call this method to unregister for events related to VoIP sessions transfer
Link copied to clipboard
open fun unregisterForUpdateSessionEvent(@NonNull sessionUpdateListener: SessionUpdateListener)
Call this method to unregister from events related to update session
Link copied to clipboard
open fun unregisterForVoipFeatureChanged(@NonNull voipFeaturesChangedListener: VoipFeaturesChangedListener)
Call this method to unregister from events related to VoIP features changes (VoIP feature becomes allowed / not allowed)
Link copied to clipboard
open fun unregisterForVolumeControl(@NonNull volumeControlListener: STWVolumeControlListener)
Call this method to unregister from callbacks when volume control stream is recommended to be changed
Link copied to clipboard
open fun unregisterVoIPACMServiceListener(@NonNull listener: STWServiceListener)
Unregister the VoIP ACM service event listener
Link copied to clipboard
open fun unregisterVoIPServiceListener(@NonNull listener: STWServiceListener)
Unregister the VoIP service event listener
Link copied to clipboard
open fun updateActiveCallForwardingType(@NonNull context: Context, callForwardingType: Int)
Call this method to update the active call forwarding type
Link copied to clipboard
open fun updateCallForwardingSettings(    @NonNull context: Context,     @NonNull callForwardingSettingsProfilesList: List<STWCallForwardingSettingsProfile>,     callForwardingSettingsType: Int,     @Nullable callback: STWOperationCallback<STWAccountSettingsError>)
Call this method to update the call forwarding settings
Link copied to clipboard
open fun useTCPFromStart(forceUseTCP: Boolean)
Call this method to force use the TCP from start.