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


助手类创建 SipProfile

Summary

Public constructors

SipProfile.Builder(SipProfile profile)

根据给定的配置文件创建一个构建器。

SipProfile.Builder(String uriString)

构造函数。

SipProfile.Builder(String username, String serverDomain)

构造函数。

Public methods

SipProfile build()

构建并返回SIP配置文件对象。

SipProfile.Builder setAuthUserName(String name)

设置用于认证的用户名。

SipProfile.Builder setAutoRegistration(boolean flag)

设置自动。

SipProfile.Builder setDisplayName(String displayName)

设置用户的显示名称。

SipProfile.Builder setOutboundProxy(String outboundProxy)

设置SIP服务器的出站代理。

SipProfile.Builder setPassword(String password)

设置SIP帐户的密码

SipProfile.Builder setPort(int port)

设置服务器的端口号。

SipProfile.Builder setProfileName(String name)

设置配置文件的名称。

SipProfile.Builder setProtocol(String protocol)

设置用于连接到SIP服务器的协议。

SipProfile.Builder setSendKeepAlive(boolean flag)

设置发送保持活动标志。

Inherited methods

From class java.lang.Object

Public constructors

SipProfile.Builder

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

根据给定的配置文件创建一个构建器。

Parameters
profile SipProfile

SipProfile.Builder

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

构造函数。

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)

构造函数。

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 ()

构建并返回SIP配置文件对象。

Returns
SipProfile the profile object created

setAuthUserName

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

设置用于认证的用户名。

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)

设置自动。 注册标志。

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)

设置用户的显示名称。

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)

设置SIP服务器的出站代理。

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)

设置SIP帐户的密码

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)

设置服务器的端口号。 默认情况下,它是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)

设置配置文件的名称。 这个名字是由用户给出的。

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

setProtocol

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

设置用于连接到SIP服务器的协议。 目前只支持“UDP”和“TCP”。

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)

设置发送保持活动标志。

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

Hooray!