public static class SendBird.Options
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SendBird.Options.ThreadOption
ThreadOption determines how SendBird will manage or create threads when callbacks or events are called. |
Constructor and Description |
---|
Options() |
Modifier and Type | Method and Description |
---|---|
static void |
setAuthenticationTimeout(int authenticationTimeout)
Deprecated.
Deprecated as of 3.1.6. ConnectionManager is deprecated. Please refer to
ConnectionManager |
static void |
setConnectionTimeout(int connectionTimeout)
Sets the connect timeout for socket connection managed by
SendBird.connect(String, ConnectHandler) , SendBird.connect(String, String, ConnectHandler) ,
SendBird.connect(String, String, String, String, ConnectHandler) , SendBird.reconnect() or internal reconnection tries. |
static void |
setHandlerForCallbacks(android.os.Handler handler)
Deprecated.
As of 3.0.98, replaced by
setThreadOption(ThreadOption, Handler) . |
static void |
setThreadOption(SendBird.Options.ThreadOption threadOption,
android.os.Handler handler)
Sets
ThreadOption . |
static void |
setTypingIndicatorThrottle(int msec)
Sets typing indicator throttle.
|
static void |
setWebSocketResponseTimeout(int webSocketResponseTimeoutSec)
Sets the websocket response timeout used in sending/receiving commmands by websocket.
|
static void |
useMemberAsMessageSender(boolean tf)
If set
true , the sender information of BaseMessage.getSender() or
BaseMessage.getSender() such as nickname and profile url will be returned as the same with channel members'. |
static void |
useUiThreadForCallbacks(boolean tf)
Deprecated.
As of 3.0.98, replaced by
setThreadOption(ThreadOption, Handler) . |
public static void useMemberAsMessageSender(boolean tf)
true
, the sender information of BaseMessage.getSender()
or
BaseMessage.getSender()
such as nickname and profile url will be returned as the same with channel members'.
Otherwise, the information will be the value of the message creation time.tf
- true
or false
.@Deprecated public static void useUiThreadForCallbacks(boolean tf)
setThreadOption(ThreadOption, Handler)
.true
, callbacks are returned on the UI thread.
Otherwise, the callbacks run on background threads.
The default value is true
.
If set your handler with setHandlerForCallbacks(Handler)
, this option will be ignored.tf
- true
or false
.@Deprecated public static void setHandlerForCallbacks(android.os.Handler handler)
setThreadOption(ThreadOption, Handler)
.useUiThreadForCallbacks(boolean)
option will be work.handler
- handler.public static void setThreadOption(SendBird.Options.ThreadOption threadOption, android.os.Handler handler)
ThreadOption
. Refer to SendBird.Options.ThreadOption
.
If you want to use SendBird.Options.ThreadOption.HANDLER
, you should provide your handler as a parameter.
Otherwise, set Handler
parameter to null
.threadOption
- ThreadOption
you want to set.handler
- Your Handler
object.public static void setConnectionTimeout(int connectionTimeout)
SendBird.connect(String, ConnectHandler)
, SendBird.connect(String, String, ConnectHandler)
,
SendBird.connect(String, String, String, String, ConnectHandler)
, SendBird.reconnect()
or internal reconnection tries.
The default value is 10 seconds.connectionTimeout
- Timeout in seconds. It must be greater than 0. Otherwise, the default value (10 seconds) will be set.@Deprecated public static void setAuthenticationTimeout(int authenticationTimeout)
ConnectionManager
ConnectionManager#authenticate(ConnectionManager.AuthInfoRequestHandler, ConnectionManager.AuthenticateHandler)
.
The default value is 10 seconds.authenticationTimeout
- Timeout in seconds. It must be greater than 0. Otherwise, the default value (10 seconds) will be set.public static void setTypingIndicatorThrottle(int msec)
GroupChannel.startTyping()
, GroupChannel.endTyping()
The default value is 1000 milliseconds.msec
- (min:1000 ~ max:9000)public static void setWebSocketResponseTimeout(int webSocketResponseTimeoutSec)
webSocketResponseTimeoutSec
- Timeout value in seconds. Copyright © 2021, Sendbird or its affiliates. All rights reserved.
Report a bug or request a feature
For further developer documentation, see Chat SDK Documentation. That documentation contains more detailed descriptions, conceptual overviews, definitions of terms, and code examples.