public static class Session.Builder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Session.Builder.IceServer
This is part of the
configurable TURN feature.
|
static class |
Session.Builder.IncludeServers
This is part of the
configurable TURN feature.
|
static class |
Session.Builder.TransportPolicy
This is part of the
configurable TURN feature.
|
Constructor and Description |
---|
Builder(android.content.Context context,
java.lang.String apiKey,
java.lang.String sessionId)
Use this builder to create a Session instance.
|
Modifier and Type | Method and Description |
---|---|
Session |
build()
Returns a new
Session instance based on the Session.Builder
settings. |
Session.Builder |
connectionEventsSuppressed(java.lang.Boolean enabled)
Prevent connection events (such as
Session.ConnectionListener.onConnectionCreated(Session session,
Connection connection) ) from being dispatched. |
Session.Builder |
sessionOptions(Session.SessionOptions sessionOptions)
Sets advanced options for the session.
|
Session.Builder |
setApiUrl(java.net.URL apiUrl)
Deprecated.
|
Session.Builder |
setCustomIceServers(java.util.List<Session.Builder.IceServer> serverList,
Session.Builder.IncludeServers config)
This is part of the
configurable TURN feature.
|
Session.Builder |
setIceRouting(Session.Builder.TransportPolicy routing)
This is part of the
configurable TURN feature.
|
Session.Builder |
setIpWhitelist(boolean enabled)
Set this to
true if IP white listing is enabled for your project. |
Session.Builder |
setProxyUrl(java.lang.String proxyUrl)
This method is part of a private beta program.
|
public Builder(android.content.Context context, java.lang.String apiKey, java.lang.String sessionId)
context
- The Android application context associated with this process.apiKey
- Your OpenTok API key. See the your
TokBox account page.sessionId
- The OpenTok session ID this instance should connect to. For
test purposes, you can generate test session by logging into your
TokBox account. Use the
OpenTok
server-side SDKs to generate session IDs in your shipping app.Session.setSessionListener(com.opentok.android.Session.SessionListener)
public Session.Builder connectionEventsSuppressed(java.lang.Boolean enabled)
Session.ConnectionListener.onConnectionCreated(Session session,
Connection connection)
) from being dispatched.
The default value is false
.
public Session.Builder sessionOptions(Session.SessionOptions sessionOptions)
Session.SessionOptions
public Session.Builder setCustomIceServers(java.util.List<Session.Builder.IceServer> serverList, Session.Builder.IncludeServers config)
public Session.Builder setIceRouting(Session.Builder.TransportPolicy routing)
@Deprecated public Session.Builder setApiUrl(java.net.URL apiUrl)
public Session.Builder setIpWhitelist(boolean enabled)
true
if IP white listing is enabled for your project.
(This is available as and add-on feature for
enterprise accounts.)
The default value is false
.public Session.Builder setProxyUrl(java.lang.String proxyUrl)