Android APIs
public static class

SipProfile.Builder

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

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SipProfile.Builder (SipProfile profile)

Added in API level 9

Creates a builder based on the given profile.

Parameters
profile SipProfile

public SipProfile.Builder (String uriString)

Added in API level 9

Constructor.

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

public SipProfile.Builder (String username, String serverDomain)

Added in API level 9

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

public SipProfile build ()

Added in API level 9

Builds and returns the SIP profile object.

Returns
SipProfile the profile object created

public SipProfile.Builder setAuthUserName (String name)

Added in API level 12

Sets the username used for authentication.

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

public SipProfile.Builder setAutoRegistration (boolean flag)

Added in API level 9

Sets the auto. registration flag.

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

public SipProfile.Builder setDisplayName (String displayName)

Added in API level 9

Sets the display name of the user.

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

public SipProfile.Builder setOutboundProxy (String outboundProxy)

Added in API level 9

Sets the outbound proxy of the SIP server.

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

public SipProfile.Builder setPassword (String password)

Added in API level 9

Sets the password of the SIP account

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

public SipProfile.Builder setPort (int port)

Added in API level 9

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

public SipProfile.Builder setProfileName (String name)

Added in API level 9

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

public SipProfile.Builder setProtocol (String protocol)

Added in API level 9

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

public SipProfile.Builder setSendKeepAlive (boolean flag)

Added in API level 9

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