Added in API level 9
Deprecated in API level 31

Builder

open class Builder
kotlin.Any
   ↳ android.net.sip.SipProfile.Builder

Helper class for creating a SipProfile.

Summary

Public constructors
Builder(profile: SipProfile!)

Creates a builder based on the given profile.

Builder(uriString: String!)

Constructor.

Builder(username: String!, serverDomain: String!)

Constructor.

Public methods
open SipProfile!

Builds and returns the SIP profile object.

open SipProfile.Builder!

Sets the username used for authentication.

open SipProfile.Builder!

Sets the auto.

open SipProfile.Builder!
setDisplayName(displayName: String!)

Sets the display name of the user.

open SipProfile.Builder!
setOutboundProxy(outboundProxy: String!)

Sets the outbound proxy of the SIP server.

open SipProfile.Builder!
setPassword(password: String!)

Sets the password of the SIP account

open SipProfile.Builder!
setPort(port: Int)

Sets the port number of the server.

open SipProfile.Builder!

Sets the name of the profile.

open SipProfile.Builder!
setProtocol(protocol: String!)

Sets the protocol used to connect to the SIP server.

open SipProfile.Builder!

Sets the send keep-alive flag.

Public constructors

Builder

Added in API level 9
Builder(profile: SipProfile!)

Creates a builder based on the given profile.

Builder

Added in API level 9
Builder(uriString: String!)

Constructor.

Parameters
uriString String!: the URI string as "sip:@"
Exceptions
java.text.ParseException if the string is not a valid URI

Builder

Added in API level 9
Builder(
    username: String!,
    serverDomain: String!)

Constructor.

Parameters
username String!: username of the SIP account
serverDomain String!: the SIP server domain; if the network address is different from the domain, use setOutboundProxy to set server address
Exceptions
java.text.ParseException if the parameters are not valid

Public methods

build

Added in API level 9
open fun build(): SipProfile!

Deprecated: Deprecated in Java.

Builds and returns the SIP profile object.

Return
SipProfile! the profile object created

setAuthUserName

Added in API level 12
Deprecated in API level 31
open fun setAuthUserName(name: String!): SipProfile.Builder!

Deprecated: Deprecated in Java.

Sets the username used for authentication.

Parameters
name String!: authentication username of the profile
Return
SipProfile.Builder! this builder object

setAutoRegistration

Added in API level 9
open fun setAutoRegistration(flag: Boolean): SipProfile.Builder!

Deprecated: Deprecated in Java.

Sets the auto. registration flag.

Parameters
flag Boolean: true if the profile will be registered automatically, false otherwise
Return
SipProfile.Builder! this builder object

setDisplayName

Added in API level 9
open fun setDisplayName(displayName: String!): SipProfile.Builder!

Deprecated: Deprecated in Java.

Sets the display name of the user.

Parameters
displayName String!: display name of the user
Return
SipProfile.Builder! this builder object

setOutboundProxy

Added in API level 9
open fun setOutboundProxy(outboundProxy: String!): SipProfile.Builder!

Deprecated: Deprecated in Java.

Sets the outbound proxy of the SIP server.

Parameters
outboundProxy String!: the network address of the outbound proxy
Return
SipProfile.Builder! this builder object

setPassword

Added in API level 9
open fun setPassword(password: String!): SipProfile.Builder!

Deprecated: Deprecated in Java.

Sets the password of the SIP account

Parameters
password String!: password of the SIP account
Return
SipProfile.Builder! this builder object

setPort

Added in API level 9
open fun setPort(port: Int): SipProfile.Builder!

Deprecated: Deprecated in Java.

Sets the port number of the server. By default, it is 5060.

Parameters
port Int: port number of the server
Return
SipProfile.Builder! this builder object
Exceptions
java.lang.IllegalArgumentException if the port number is out of range

setProfileName

Added in API level 9
open fun setProfileName(name: String!): SipProfile.Builder!

Deprecated: Deprecated in Java.

Sets the name of the profile. This name is given by user.

Parameters
name String!: name of the profile
Return
SipProfile.Builder! this builder object

setProtocol

Added in API level 9
open fun setProtocol(protocol: String!): SipProfile.Builder!

Deprecated: Deprecated in Java.

Sets the protocol used to connect to the SIP server. Currently, only "UDP" and "TCP" are supported.

Parameters
protocol String!: the protocol string
Return
SipProfile.Builder! this builder object
Exceptions
java.lang.IllegalArgumentException if the protocol is not recognized

setSendKeepAlive

Added in API level 9
open fun setSendKeepAlive(flag: Boolean): SipProfile.Builder!

Deprecated: Deprecated in Java.

Sets the send keep-alive flag.

Parameters
flag Boolean: true if sending keep-alive message is required, false otherwise
Return
SipProfile.Builder! this builder object