Most visited

Recently visited

Added in API level 9

SipProfile.Builder

public static class SipProfile.Builder
extends Object

java.lang.Object
   ↳ android.net.sip.SipProfile.Builder


Helper class for creating a SipProfile.

Summary

Public constructors

SipProfile.Builder(SipProfile profile)

Creates a builder based on the given profile.

SipProfile.Builder(String uriString)

Constructor.

SipProfile.Builder(String username, String serverDomain)

Constructor.

Public methods

SipProfile build()

Builds and returns the SIP profile object.

SipProfile.Builder setAuthUserName(String name)

Sets the username used for authentication.

SipProfile.Builder setAutoRegistration(boolean flag)

Sets the auto.

SipProfile.Builder setDisplayName(String displayName)

Sets the display name of the user.

SipProfile.Builder setOutboundProxy(String outboundProxy)

Sets the outbound proxy of the SIP server.

SipProfile.Builder setPassword(String password)

Sets the password of the SIP account

SipProfile.Builder setPort(int port)

Sets the port number of the server.

SipProfile.Builder setProfileName(String name)

Sets the name of the profile.

SipProfile.Builder setProtocol(String protocol)

Sets the protocol used to connect to the SIP server.

SipProfile.Builder setSendKeepAlive(boolean flag)

Sets the send keep-alive flag.

Inherited methods

From class java.lang.Object

Public constructors

SipProfile.Builder

Added in API level 9
SipProfile.Builder (SipProfile profile)

Creates a builder based on the given profile.

Parameters
profile SipProfile

SipProfile.Builder

Added in API level 9
SipProfile.Builder (String uriString)

Constructor.

Parameters
uriString String: the URI string as "sip:@"
Throws
ParseException if the string is not a valid URI

SipProfile.Builder

Added in API level 9
SipProfile.Builder (String username, 
                String serverDomain)

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(String) to set server address
Throws
ParseException if the parameters are not valid

Public methods

build

Added in API level 9
SipProfile build ()

Builds and returns the SIP profile object.

Returns
SipProfile the profile object created

setAuthUserName

Added in API level 12
SipProfile.Builder setAuthUserName (String name)

Sets the username used for authentication.

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

setAutoRegistration

Added in API level 9
SipProfile.Builder setAutoRegistration (boolean flag)

Sets the auto. registration flag.

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

setDisplayName

Added in API level 9
SipProfile.Builder setDisplayName (String displayName)

Sets the display name of the user.

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

setOutboundProxy

Added in API level 9
SipProfile.Builder setOutboundProxy (String outboundProxy)

Sets the outbound proxy of the SIP server.

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

setPassword

Added in API level 9
SipProfile.Builder setPassword (String password)

Sets the password of the SIP account

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

setPort

Added in API level 9
SipProfile.Builder setPort (int port)

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

Parameters
port int: port number of the server
Returns
SipProfile.Builder this builder object
Throws
IllegalArgumentException if the port number is out of range

setProfileName

Added in API level 9
SipProfile.Builder setProfileName (String name)

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

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

setProtocol

Added in API level 9
SipProfile.Builder setProtocol (String protocol)

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

Parameters
protocol String: the protocol string
Returns
SipProfile.Builder this builder object
Throws
IllegalArgumentException if the protocol is not recognized

setSendKeepAlive

Added in API level 9
SipProfile.Builder setSendKeepAlive (boolean flag)

Sets the send keep-alive flag.

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

Hooray!