Sendbird Chat SDK for Unity
|
Static Public Member Functions | |
static SbConnectionState | GetConnectionState () |
Gets the SDK connection state. More... | |
static void | Init (SbInitParams inInitParams) |
Initializes SendbirdChat with given app ID. More... | |
static void | Connect (string inUserId, SbUserHandler inCompletionHandler) |
Performs a connection to Sendbird with the user ID. More... | |
static void | Connect (string inUserId, string inAuthToken, SbUserHandler inCompletionHandler) |
Performs a connection to Sendbird with the user ID and the access token. More... | |
static void | Connect (string inUserId, string inAuthToken, string inApiHost, string inWsHost, SbUserHandler inCompletionHandler) |
Performs a connection to Sendbird with the user ID and the access token. More... | |
static void | Disconnect (SbDisconnectHandler inDisconnectHandler) |
Disconnects from Sendbird. If this method is invoked, the current user will be invalidated. More... | |
static bool | Reconnect () |
Starts reconnection explicitly. The ConnectionDelegate delegates will be invoked by the reconnection process. More... | |
static void | SetChannelInvitationPreference (bool inAutoAccept, SbErrorHandler inCompletionHandler) |
Sets group channel invitation preference for auto acceptance. More... | |
static void | GetChannelInvitationPreference (SbChannelInvitationPreferenceHandler inCompletionHandler) |
Gets group channel invitation preference for auto acceptance. More... | |
static void | SetSessionHandler (SbSessionHandler inSessionHandler) |
Set a SessionHandler which is required for SDK refresh the session when the current session expires. More... | |
static void | AddUseEventHandler (string inIdentifier, SbUserEventHandler inUserEventHandler) |
Adds a user event handler. All added handlers will be notified when events occur. More... | |
static void | RemoveUserEventHandler (string inIdentifier) |
Removes a user event handler. The deleted handler no longer be notified. More... | |
static void | RemoveAllUserEventHandlers () |
Removes all user event handlers added by AddUseEventHandler. More... | |
static void | AddConnectionHandler (string inIdentifier, SbConnectionHandler inConnectionHandler) |
Adds a connection handler. All added handlers will be notified when events occurs. More... | |
static void | RemoveConnectionHandler (string inIdentifier) |
Removes a connection handler. The deleted handler no longer be notified. More... | |
static void | RemoveAllConnectionHandlers () |
Removes all connection handlers added by AddConnectionHandler. More... | |
static void | BlockUser (string inUserId, SbUserHandler inCompletionHandler) |
Blocks the specified User ID. Blocked User cannot send messages to the blocker. More... | |
static void | UnblockUser (string inUserId, SbErrorHandler inCompletionHandler) |
Unblocks the specified User ID. Unblocked User cannot send messages to the ex-blocker. More... | |
static SbApplicationUserListQuery | CreateApplicationUserListQuery (SbApplicationUserListQueryParams inParams=null) |
Creates a query instance to get the whole User list. More... | |
static SbBlockedUserListQuery | CreateBlockedUserListQuery (SbBlockedUserListQueryParams inParams=null) |
Creates a query instance to get only the blocked User (by me) list. More... | |
static SbMessageSearchQuery | CreateMessageSearchQuery (SbMessageSearchQueryParams inParams=null) |
Creates a query instance to search for a message. More... | |
static void | UpdateCurrentUserInfo (SbUserUpdateParams inParams, SbErrorHandler inCompletionHandler) |
Updates current User's information. More... | |
static void | UpdateCurrentUserInfo (List< string > inPreferredLanguages, SbErrorHandler inCompletionHandler) |
Updates current User's information. More... | |
static void | RegisterPushToken (SbPushTokenType inPushTokenType, string inPushToken, bool inUnique, SbPushTokenRegistrationStatusHandler inCompletionHandler) |
Registers push token for the current User to receive push notification. More... | |
static void | UnregisterPushToken (SbPushTokenType inPushTokenType, string inPushToken, SbErrorHandler inCompletionHandler) |
Unregisters push token for the current User. More... | |
static void | UnregisterAllPushToken (SbErrorHandler inCompletionHandler) |
Unregisters all push token bound to the current User. More... | |
static void | GetMyPushTokensByToken (string inToken, SbPushTokenType inPushTokenType, SbPushTokensHandler inCompletionHandler) |
Requests push tokens of current user from given token. The result is passed to handler. More... | |
static void | SetPushTemplate (string inTemplateName, SbErrorHandler inCompletionHandler) |
Sets push template option for the current User. More... | |
static void | GetPushTemplate (SbPushTemplateHandler inCompletionHandler) |
Gets push template option for the current User. For details of push template option, refer to SetPushTemplate. This can be used, for instance, when you need to check the push notification content preview is on or off at the moment. More... | |
static void | SetSnoozePeriod (bool inEnabled, long inStartTimestamp, long inEndTimestamp, SbErrorHandler inCompletionHandler) |
Sets snooze period for the current User. If this option is enabled, the current User does not receive push notification during the given period. It's not a repetitive operation. If you want to snooze repeatedly, use SetDoNotDisturb. More... | |
static void | GetSnoozePeriod (SbSnoozePeriodHandler inCompletionHandler) |
Gets snooze period for the current User. More... | |
static void | SetDoNotDisturb (bool inEnabled, int inStartHour, int inStartMin, int inEndHour, int inEndMin, string inTimezone, SbErrorHandler inCompletionHandler) |
Sets Do-not-disturb option for the current User. If this option is enabled, the current User does not receive push notification during the specified time repeatedly. If you want to snooze specific period, use SetSnoozePeriod. More... | |
static void | GetDoNotDisturb (SbDoNotDisturbHandler inCompletionHandler) |
Gets Do-not-disturb option for the current User. More... | |
static void | SetLogLevel (SbLogLevel inLogLevel) |
Sets the log level. The log level is defined by SbLogLevel. More... | |
Properties | |
static string | SDKVersion [get] |
Current SDK version. More... | |
static string | OSVersion [get] |
Current OS version. More... | |
static string | ApplicationId [get] |
Current application ID. More... | |
static string | EKey [get] |
The key to authenticate the url retrieved from SbFileMessage.PlainUrl, SbUser.PlainProfileImageUrl and SbThumbnail.PlainUrl. This key has to be put into the HTTP header to access the url provided by above methods. More... | |
static SbAppInfo | AppInfo [get] |
Represents information obtained from the application settings. More... | |
static SbUser | CurrentUser [get] |
The current connected User. null if connect is not called. More... | |
static SbGroupChannelModule | GroupChannel [get] |
SbGroupChannelModule class. More... | |
static SbOpenChannelModule | OpenChannel [get] |
SbOpenChannelModule class. More... | |
static SbMessageModule | Message [get] |
SbMessageModule class. More... | |
static SendbirdChatOptions | Options [get] |
SendbirdChatOptions class. More... | |
|
static |
Adds a connection handler. All added handlers will be notified when events occurs.
inIdentifier | |
inConnectionHandler |
|
static |
Adds a user event handler. All added handlers will be notified when events occur.
inIdentifier | |
inUserEventHandler |
|
static |
Blocks the specified User ID. Blocked User cannot send messages to the blocker.
inUserId | |
inCompletionHandler |
|
static |
Performs a connection to Sendbird with the user ID.
inUserId | The user ID. |
inCompletionHandler | The handler block to execute. user is the object to represent the current user. |
|
static |
Performs a connection to Sendbird with the user ID and the access token.
inUserId | The user ID. |
inAuthToken | The auth token. If the user doesnt have auth token, set nil. |
inCompletionHandler | The handler block to execute. user is the object to represent the current user. |
|
static |
Performs a connection to Sendbird with the user ID and the access token.
inUserId | The user ID. |
inAuthToken | The auth token. If the user doesnt have auth token, set nil. |
inApiHost | apiHost |
inWsHost | wsHost |
inCompletionHandler | The handler block to execute. user is the object to represent the current user. |
|
static |
Creates a query instance to get the whole User list.
|
static |
Creates a query instance to get only the blocked User (by me) list.
inParams |
|
static |
Creates a query instance to search for a message.
inParams |
|
static |
Disconnects from Sendbird. If this method is invoked, the current user will be invalidated.
inDisconnectHandler | The handler block to execute. |
|
static |
Gets group channel invitation preference for auto acceptance.
inCompletionHandler | The handler block to execute. |
|
static |
Gets the SDK connection state.
|
static |
Gets Do-not-disturb option for the current User.
inCompletionHandler |
|
static |
Requests push tokens of current user from given token. The result is passed to handler.
inToken | The token used to get next pagination of device push tokens. |
inPushTokenType | The enum type to represent the type of push token. |
inCompletionHandler | The handler block to be executed after requests. This block has no return value and takes 5 arguments that are device push token list, push token type you are requesting, boolean that indicates having next pagination, token to be used next pagination and error. |
|
static |
Gets push template option for the current User. For details of push template option, refer to SetPushTemplate. This can be used, for instance, when you need to check the push notification content preview is on or off at the moment.
inCompletionHandler |
|
static |
Gets snooze period for the current User.
inCompletionHandler |
|
static |
|
static |
Starts reconnection explicitly. The ConnectionDelegate delegates will be invoked by the reconnection process.
|
static |
Registers push token for the current User to receive push notification.
inPushTokenType | The enum type to represent the type of push token. |
inPushToken | Device token. |
inUnique | If true, register device token after removing existing all device tokens of the current user. If false, just add the device token. |
inCompletionHandler | The handler block to execute. status is the status for push token registration. It is defined in SbPushTokenRegistrationStatus.Success represents the devToken is registered. Pending represents the devToken is not registered because the connection is not established, so this method has to be invoked with getPendingPushToken method after the connection. Error represents the push token registration is failed. |
|
static |
Removes all connection handlers added by AddConnectionHandler.
|
static |
Removes all user event handlers added by AddUseEventHandler.
|
static |
Removes a connection handler. The deleted handler no longer be notified.
inIdentifier |
|
static |
Removes a user event handler. The deleted handler no longer be notified.
inIdentifier |
|
static |
Sets group channel invitation preference for auto acceptance.
inAutoAccept | If true, the current user will accept the group channel invitation automatically. |
inCompletionHandler | The handler block to execute. |
|
static |
Sets Do-not-disturb option for the current User. If this option is enabled, the current User does not receive push notification during the specified time repeatedly. If you want to snooze specific period, use SetSnoozePeriod.
inEnabled | Enables or not. |
inStartHour | Start hour. |
inStartMin | Start minute. |
inEndHour | End hour. |
inEndMin | End minute. |
inTimezone | Sets timezone. |
inCompletionHandler | The handler block to execute. |
|
static |
Sets the log level. The log level is defined by SbLogLevel.
inLogLevel |
|
static |
Sets push template option for the current User.
inTemplateName | The name of push template. |
inCompletionHandler | The handler block to execute. |
|
static |
Set a SessionHandler which is required for SDK refresh the session when the current session expires.
inSessionHandler |
|
static |
Sets snooze period for the current User. If this option is enabled, the current User does not receive push notification during the given period. It's not a repetitive operation. If you want to snooze repeatedly, use SetDoNotDisturb.
inEnabled | Enabled means snooze remote push notification in duration. If set to disabled, current user can receive remote push notification. |
inStartTimestamp | Unix timestamp to start snooze. |
inEndTimestamp | Unix timestamp to end snooze. |
inCompletionHandler | The handler block to execute when setting notification snoozed is complete. |
|
static |
Unblocks the specified User ID. Unblocked User cannot send messages to the ex-blocker.
inUserId | |
inCompletionHandler |
|
static |
Unregisters all push token bound to the current User.
inCompletionHandler |
|
static |
Unregisters push token for the current User.
inPushTokenType | |
inPushToken | |
inCompletionHandler |
|
static |
Updates current User's information.
inPreferredLanguages | New array of preferred languages |
inCompletionHandler | The handler block to execute. |
|
static |
Updates current User's information.
inParams | |
inCompletionHandler |
|
staticget |
Represents information obtained from the application settings.
|
staticget |
Current application ID.
|
staticget |
The current connected User. null if connect is not called.
|
staticget |
The key to authenticate the url retrieved from SbFileMessage.PlainUrl, SbUser.PlainProfileImageUrl and SbThumbnail.PlainUrl. This key has to be put into the HTTP header to access the url provided by above methods.
|
staticget |
SbGroupChannelModule class.
|
staticget |
SbMessageModule class.
|
staticget |
SbOpenChannelModule class.
|
staticget |
SendbirdChatOptions class.
|
staticget |
Current OS version.
|
staticget |
Current SDK version.