Skip to content

Most visited

Recently visited

navigation

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

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)