Class ClientConfiguration


  • public class ClientConfiguration
    extends java.lang.Object
    The ClientConfiguration class contains the configuration data related to the Client.

    Note: This should be the first class instantiated in order to make sure the sdk dependent libraries are loaded.

    • Constructor Detail

      • ClientConfiguration

        @Deprecated
        public ClientConfiguration​(java.lang.String dataDirectory)
        Deprecated.
        Constructor. No User Agent is set. Clients should explicitly set the UserAgentName
        Parameters:
        dataDirectory - The location to write persistent data
      • ClientConfiguration

        public ClientConfiguration​(android.content.Context context,
                                   java.lang.String dataDirectory)
        Constructor. User Agent is constructed with default values. BuildNumber will be set to value of the BUILD_ID field of the BuildConfig class. Client may decide to use the default UA string or choose to override it.
        Parameters:
        context - The application context
        dataDirectory - The location to write persistent data
      • ClientConfiguration

        public ClientConfiguration​(java.lang.String dataDirectory,
                                   java.lang.String productName,
                                   java.lang.String productVersion,
                                   java.lang.String platform,
                                   java.lang.String osVersion,
                                   java.lang.String buildNumber,
                                   java.lang.String vendorName)
        Constructor.
        Parameters:
        dataDirectory - The directory to use to store persistent data.
        productName - UI application or Product name.
        productVersion - UI Application version, e.g 3.0.
        platform - UI Application platform or OS name, e.g.Windows, 64 - bit.
        osVersion - Device OS version.
        buildNumber - UI application build number e.g 2.1.0.69.
        vendorName - Device Vendor name e.g Avaya.
    • Method Detail

      • getUserAgentName

        public java.lang.String getUserAgentName()
        Returns:
        the product-identifying text used in the User-Agent header.
      • setUserAgentName

        public void setUserAgentName​(java.lang.String userAgentName)
        Sets the product-identifying text used in the User-Agent header.
        Parameters:
        userAgentName - the product-identifying text used in the User-Agent header.
      • getAvayaModel

        public java.lang.String getAvayaModel()
        Returns:
        model string for publishing endpoint type to other endpoints.
      • setAvayaModel

        public void setAvayaModel​(java.lang.String avayaModel)
        Optional model string for publishing endpoint type via "+avaya.model" parameter to other endpoints. For instance, if this client is configured as Shared Control controllable endpoint, it may publish self endpoint type (e.g. 'AvayaSoftClient' or 'AvayaDeskPhone') to other shared control capable endpoints, registered with the same extension. So that control-capable client application could display this model information to the user who is going to activate shared control. This model information may help user to identify this endpoint in case multiple endpoints are available.

        It is recommended to use a short or abbreviated form for endpoint type description in order to reduce network traffic and simplify endpoint type identification for other applications.

        Parameters:
        avayaModel - the short model string.
      • getUserAgentInstanceId

        public java.lang.String getUserAgentInstanceId()
        Returns:
        the UUID that is used in +sip.instance feature tag, as per RFC 5626.
      • setUserAgentInstanceId

        public void setUserAgentInstanceId​(java.lang.String userAgentInstanceId)
        Sets unique instance id of the user agent. This is the instance.id defined in RFC 5626. According to RFC 5626, each UA MUST have an Instance Identifier Uniform Resource Name (URN) [RFC2141] that uniquely identifies the device. Usage of a URN provides a persistent and unique name for the UA instance. It also provides an easy way to guarantee uniqueness within the AOR. This URN MUST be persistent across power cycles of the device. The instance ID MUST NOT change as the device moves from one network to another. A device like a "soft phone", when first installed, can generate a UUID [RFC4122] and then save this in persistent storage for all future use.

        This is typically a string representation of a UUID.

        Parameters:
        userAgentInstanceId - the unique instance id of the user agent.
      • setDataDirectory

        public void setDataDirectory​(java.lang.String dataDirectory)
        Sets a directory to be used for storing any persistent data
        Parameters:
        dataDirectory - the directory to be used for storing any persistent data
      • setAnalyticsEnabled

        public void setAnalyticsEnabled​(boolean enabled)
        Used to control the collection of analytics data by the SDK.

        The analytics information collected by the SDK is for internal Avaya use only and contains no personally identifiable information. These analytics are used solely by Avaya for the purposes of improving its products and will not be shared with anyone outside of Avaya.

        Note that changes to this setting are not effective after the Client object has been created.

        Parameters:
        enabled - true to enable analytics collection, false to disable (this is the default setting).
      • setProductName

        public void setProductName​(java.lang.String productName)
      • getProductName

        public java.lang.String getProductName()
      • setProductVersion

        public void setProductVersion​(java.lang.String productVersion)
      • getProductVersion

        public java.lang.String getProductVersion()
      • setPlatform

        public void setPlatform​(java.lang.String platform)
      • getPlatform

        public java.lang.String getPlatform()
      • setOSVersion

        public void setOSVersion​(java.lang.String osVersion)
      • getOSVersion

        public java.lang.String getOSVersion()
      • setBuildNumber

        public void setBuildNumber​(java.lang.String buildNumber)
      • getBuildNumber

        public java.lang.String getBuildNumber()
      • setVendorName

        public void setVendorName​(java.lang.String vendorName)
      • getVendorName

        public java.lang.String getVendorName()
      • getDataDirectory

        public java.lang.String getDataDirectory()
      • isAnalyticsEnabled

        public boolean isAnalyticsEnabled()
        Returns:
        true if SDK analytics collection is enabled.
      • getSecurityPolicyConfiguration

        public SecurityPolicyConfiguration getSecurityPolicyConfiguration()
        Returns:
        the Security Policy configuration of the client
      • setSecurityPolicyConfiguration

        public void setSecurityPolicyConfiguration​(SecurityPolicyConfiguration securityPolicyConfiguration)
        Set the Security Policy configuration for the client
        Parameters:
        securityPolicyConfiguration - the Security Policy configuration for the client
      • getMediaConfiguration

        public MediaConfiguration getMediaConfiguration()
        Returns:
        the Media(audio, video) configuration for the client
      • setMediaConfiguration

        public void setMediaConfiguration​(MediaConfiguration mediaConfiguration)
        Set the Media(audio, video) configuration for the client
        Parameters:
        mediaConfiguration - the Media(audio, video) configuration for the client
      • getProxyMode

        public ClientConfiguration.ProxyMode getProxyMode()
        Get Client SDK Proxy mode to use with network connections
        Returns:
        ProxyMode
      • setProxyMode

        public void setProxyMode​(ClientConfiguration.ProxyMode mProxyMode)
        Set Client SDK Proxy mode to use with network connections
        Parameters:
        mProxyMode - the Client SDK Proxy mode to use with network connections
      • getProxyCredentialProvider

        public CredentialProvider getProxyCredentialProvider()
        Credential provider for proxy authentication
        Returns:
        CredentialProvider
      • setProxyCredentialProvider

        public void setProxyCredentialProvider​(CredentialProvider mProxyCredentialProvider)
        Set CredentialProvider for proxy authentication
        Parameters:
        mProxyCredentialProvider - CredentialProvider for proxy authentication
      • isProxyFallbackEnabled

        public boolean isProxyFallbackEnabled()
        Checks whenever proxy fallback is enabled.
        Returns:
        true if proxy fallback is enabled.
      • setProxyFallbackEnabled

        public void setProxyFallbackEnabled​(boolean proxyFallbackEnabled)
        Sets proxy fallback status.

        Proxy fallback is a feature that will allow Client SDK to connect directly to given endpoint despite proxy settings. First, connection is made via proxy (if set in Operating System) and if there's a failure (except wrong credentials), another attempt is made to establish a connection, only this time bypassing proxy settings.

        Parameters:
        proxyFallbackEnabled - the proxy fallback status.
      • setBindProcessToCellularEnabled

        public void setBindProcessToCellularEnabled​(boolean bindProcessToCellular)
        Sets user’s preference to use route all network traffic for the process through cellular network. When both WiFi and cellular data network connectivity are available, all the network traffic for the process is routed through the cellular data network. When cellular data network connectivity is not available but WiFi connectivity is, all network traffic for the process is routed through WiFi. If cellular data network connectivity becomes available while connected through WiFi, all process network traffic including any active call(s) will be moved over to the cellular data network. The change in process state of being bound to cellular is notified through DefaultNetworkListener.onClientProcessBoundToCellular(Client, boolean)
        Parameters:
        bindProcessToCellular - true to enable cellular network as preference for the process else false to disable (this is the default setting). If true then application need to hold manifest.permission.CHANGE_NETWORK_STATE or manifest.permission.WRITE_SETTINGS permission else Client(ClientConfiguration, Application, ClientListener) will throw SecurityException.
      • isBindProcessToCellularEnabled

        public boolean isBindProcessToCellularEnabled()
        Checks if the bind process to cellular setting is enabled.
        Returns:
        true if bind process to cellular setting is enabled.