Classes | |
class | ChannelHandler |
class | ConnectionHandler |
class | Options |
class | UserEventHandler |
Public Types | |
enum | ConnectionState { CONNECTING, OPEN, CLOSING, CLOSED } |
enum | PushTokenRegistrationStatus { SUCCESS, PENDING, ERROR } |
Public Member Functions | |
delegate void | LogDelegate (string message) |
delegate void | ConnectHandler (User user, SendBirdException e) |
delegate void | DisconnectHandler () |
delegate void | RegisterPushTokenWithStatusHandler (PushTokenRegistrationStatus status, SendBirdException e) |
delegate void | UnregisterPushTokenHandler (SendBirdException e) |
delegate void | SetDoNotDisturbHandler (SendBirdException e) |
delegate void | GetDoNotDisturbHandler (bool isDoNotDisturbOn, int startHour, int startMin, int endHour, int endMin, string timezone, SendBirdException e) |
delegate void | UserInfoUpdateHandler (SendBirdException e) |
delegate void | UserBlockHandler (User blockedUser, SendBirdException e) |
delegate void | UserUnblockHandler (SendBirdException e) |
delegate void | UploadFriendDiscoveriesHandler (SendBirdException e) |
delegate void | GetFriendChangeLogsByTokenHandler (List< User > updatedUsers, List< string > deletedUserIds, bool hasMore, string token, SendBirdException e) |
delegate void | SetChannelInvitationPreferenceHandler (SendBirdException e) |
delegate void | GetChannelInvitationPreferenceHandler (bool autoAccept, SendBirdException e) |
delegate void | LoginHandler (SendBirdException e) |
delegate void | GetMyGroupChannelChangeLogsHandler (List< GroupChannel > updatedChannels, List< String > deletedChannelUrls, bool hasMore, String token, SendBirdException e) |
delegate void | DeleteFriendDiscoveriesHandler (SendBirdException e) |
delegate void | MarkAsReadHandler (SendBirdException e) |
delegate void | GetAllEmojiHandler (EmojiContainer emojiContainer, SendBirdException e) |
delegate void | GetEmojiCategoryHandler (EmojiCategory emojiCategory, SendBirdException e) |
delegate void | GetEmojiHandler (Emoji emoji, SendBirdException e) |
delegate void | DeleteFriendDiscoveryHandler (SendBirdException e) |
Static Public Member Functions | |
static bool | Init (string appId) |
static ConnectionState | GetConnectionState () |
static void | Connect (string userId, ConnectHandler handler) |
static void | Connect (string userId, string accessToken, ConnectHandler handler) |
static void | Connect (string userId, string accessToken, string apiHost, string wsHost, ConnectHandler handler) |
static bool | Reconnect () |
static void | AddChannelHandler (string identifier, ChannelHandler handler) |
static ChannelHandler | RemoveChannelHandler (string identifier) |
static void | AddConnectionHandler (string identifier, ConnectionHandler handler) |
static void | AddUserEventHandler (string identifier, UserEventHandler handler) |
static UserEventHandler | RemoveUserEventHandler (string identifier) |
static void | RemoveAllUserEventHandlers () |
static ConnectionHandler | RemoveConnectionHandler (string identifier) |
static void | Disconnect (DisconnectHandler handler) |
static UserListQuery | CreateUserListQuery () |
static ApplicationUserListQuery | CreateApplicationUserListQuery () |
static UserListQuery | CreateUserListQuery (UserListQuery.QueryType queryType) |
static UserListQuery | CreateUserListQuery (List< string > userIds) |
static UserListQuery | CreateBlockedUserListQuery () |
static void | UpdateCurrentUserInfoWithProfileImage (string nickname, SBFile profileImage, UserInfoUpdateHandler handler) |
static void | UpdateCurrentUserInfo (string nickname, string profileUrl, UserInfoUpdateHandler handler) |
static string | GetPendingPushToken () |
static void | RegisterAPNSPushTokenForCurrentUser (string apnsRegToken, RegisterPushTokenWithStatusHandler handler) |
static void | UnregisterAPNSPushTokenForCurrentUser (string apnsRegToken, UnregisterPushTokenHandler handler) |
static void | RegisterFCMPushTokenForCurrentUser (string fcmRegToken, RegisterPushTokenWithStatusHandler handler) |
static void | UnregisterFCMPushTokenForCurrentUser (string fcmRegToken, UnregisterPushTokenHandler handler) |
static void | UnregisterPushTokenAllForCurrentUser (UnregisterPushTokenHandler handler) |
static void | SetDoNotDisturb (bool doNotDisturbOn, int startHour, int startMin, int endHour, int endMin, string timezone, SetDoNotDisturbHandler handler) |
static void | GetDoNotDisturb (GetDoNotDisturbHandler handler) |
static void | BlockUser (User userToBlock, UserBlockHandler handler) |
static void | BlockUserWithUserId (string userIdToBlock, UserBlockHandler handler) |
static void | UnblockUser (User blockedUser, UserUnblockHandler handler) |
static void | UnblockUserWithUserId (string blockedUserId, UserUnblockHandler handler) |
static void | GetFriendChangeLogsByToken (string token, GetFriendChangeLogsByTokenHandler handler) |
static void | UploadFriendDiscoveries (Dictionary< string, string > discoveryMap, UploadFriendDiscoveriesHandler handler) |
static void | DeleteFriendDiscoveries (List< string > discoveryKeys, DeleteFriendDiscoveriesHandler handler) |
static void | DeleteFriendDiscovery (string discoveryKey, DeleteFriendDiscoveryHandler handler) |
static FriendListQuery | CreateFriendListQuery () |
static void | SetChannelInvitationPreference (bool autoAccept, SetChannelInvitationPreferenceHandler handler) |
static void | GetChannelInvitationPreference (GetChannelInvitationPreferenceHandler handler) |
static void | GetMyGroupChannelChangeLogsByToken (String token, List< String > customTypes, GetMyGroupChannelChangeLogsHandler handler) |
static void | MarkAsReadWithChannelUrls (List< String > channelUrls, MarkAsReadHandler handler) |
static void | GetAllEmoji (GetAllEmojiHandler handler) |
static void | GetEmojiCategory (long emojiCategoryId, GetEmojiCategoryHandler handler) |
static void | GetEmoji (String key, GetEmojiHandler handler) |
Static Public Attributes | |
static LogDelegate | Log |
Log More... | |
static int | LOGGER_NONE = Logger.NONE |
static int | LOGGER_INFO = Logger.INFO |
Properties | |
static string | OSVersion [get] |
static string | SDKVersion [get] |
static string | ApplicationId [get] |
static int | LoggerLevel [get, set] |
static User | CurrentUser [get] |
static string | Ekey [get] |
|
strong |
SDK connection state.
Status of push token registration. If connection is not made when token is requested to be registered, PENDING
will be returned at callback handler. The registration is available after the connection is established by calling RegisterPushTokenForCurrentUser(string, RegisterPushTokenWithStatusHandler) with GetPendingPushToken().
|
inlinestatic |
Adds a channel handler. All added handlers will be notified when events occur.
identifier | ID of handler to be added. |
handler | Handler to be added. |
|
inlinestatic |
Adds a connection handler. All added handlers will be notified when events occurs.
identifier | ID of handler to be added. |
handler | Handler to be added. |
|
inlinestatic |
Adds a user event handler. All added handlers will be notified when events occur.
identifier | ID of handler to be added. |
handler | Handler to be added. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Connects to SendBird with given User
ID. If you have created User
s with access token, refer to Connect(string, string, ConnectHandler).
Even though User
is not created by Platform API, this method creates one and calls callback to return it.
userId | User ID to connect with. Refer to User#UserId. |
handler | Callback handler. |
|
inlinestatic |
Connects to SendBird with given User
ID and access token. If you have created User
s without access token, refer to Connect(string, ConnectHandler) or just pass access token with null
.
userId | User ID to connect with. Refer to User#UserId. |
accessToken | Access token. It should not be saved on the client side. |
handler | Callback handler. |
|
inlinestatic |
Connects to SendBird with given User
ID and access token. If you have created User
s without access token, refer to connect(String, ConnectHandler) or just pass access token with null
.
userId | User ID to connect with. Refer to User#getUserId(). |
accessToken | Access token. It should not be saved on the client side. |
apiHost | Custom API Host. Internal use only. |
wsHost | Custom WS Host. Internal use only. |
handler | Callback handler. |
delegate void SendBird.SendBirdClient.ConnectHandler | ( | User | user, |
SendBirdException | e | ||
) |
Connect handler. This handler provides callback for Connect(string, ConnectHandler) and Connect(string, string, ConnectHandler).
|
inlinestatic |
|
inlinestatic |
Creates a query instance to get only the blocked User
(by me) list.
|
inlinestatic |
Creates a query instance to get friends.
|
inlinestatic |
Creates a query instance to get the whole User
list.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Delete friend discoveries.
discoveryKeys | The discovery keys to delete friend discoveries. |
handler | Callback handler. |
|
inlinestatic |
Delete friend discovery.
discoveryKey | The discovery key to delete friend discovery. |
handler | Callback handler. |
|
inlinestatic |
Disconnects from SendBird.
handler | Callback handler. |
delegate void SendBird.SendBirdClient.DisconnectHandler | ( | ) |
Disconnect handler. This handler provides callback for disconnect(DisconnectHandler).
|
inlinestatic |
Requests the all emoji. The result is passed to handler
.
handler | Callback handler. |
|
inlinestatic |
Gets SDK connection state.
|
inlinestatic |
Gets Do-not-disturb option for the current User
.
handler | Callback handler. |
delegate void SendBird.SendBirdClient.GetDoNotDisturbHandler | ( | bool | isDoNotDisturbOn, |
int | startHour, | ||
int | startMin, | ||
int | endHour, | ||
int | endMin, | ||
string | timezone, | ||
SendBirdException | e | ||
) |
GetDoNotDisturb handler. This handler provides callback for GetDoNotDisturb(GetDoNotDisturbHandler).
|
inlinestatic |
Requests the emoji. The result is passed to handler
.
key | Emoji key. |
handler | Callback handler. |
|
inlinestatic |
Requests the emoji category. The result is passed to handler
.
emojiCategoryId | Emoji category id. |
handler | Callback handler. |
|
inlinestatic |
Get friend changelogs by token.
token | Token to get next friend changelogs. If the token is null, the result will be passed from the beginning. |
handler | Callback handler. |
delegate void SendBird.SendBirdClient.GetFriendChangeLogsByTokenHandler | ( | List< User > | updatedUsers, |
List< string > | deletedUserIds, | ||
bool | hasMore, | ||
string | token, | ||
SendBirdException | e | ||
) |
GetFriendChangeLogsByTokenHandler handler. This handler provides callback for getFriendChangeLogsByToken(String, GetFriendChangeLogsByTokenHandler). A callback for when friends are added.
updatedUsers | Updated User list. |
deletedUserIds | Deleted User id list. |
hasMore | HasMore. |
token | Token. |
e | null if no error. |
|
inlinestatic |
Requests the channel changelogs from given token. The result is passed to handler
.
token | Token to get next channel changelogs. If the token is null, the result will be passed from the beginning. |
customTypes | GroupChannel custom types filter. |
handler | Callback handler. |
|
inlinestatic |
Gets the pending push token.
null
if there is no registration pending token.
|
inlinestatic |
Initializes SendBird with given appId.
appId | Application ID which you can get by creating the application at SendBird Dashboard. Refer to SendBird Docs for further details. |
|
inlinestatic |
Sends mark as read to joined GroupChannel
s. This method has rate limit. You can send one request per second. It returns SendBirdException if you exceed the rate limit.
channelUrls | Channel Urls. |
handler | Callback handler. |
|
inlinestatic |
Reconnecting with current user information. This can be called in ConnectionHandler#onReconnectFailed() or where you check the device network status to let the SDK try reconnection. ConnectionHandler#onReconnectStarted() will be called after you call this (note that it will not be called if there is previously started connection process which has not finished), and ConnectionHandler#onReconnectFailed() or ConnectionHandler#onReconnectSucceeded() will be called according to the connection status afterwards.
Usually, the SDK automatically retries connection process when the network connection is lost with some backoff period. When you call this method, you can start connection process immediately.
true
if there is previously and successfully connected user information, false
otherwise. When false
is returned, please try with connect(String, ConnectHandler) or connect(String, String, ConnectHandler).
|
inlinestatic |
Registers push token for the current User
to receive push notification. To enable push notification and get a token, refer to SendBird Docs.
Push token registration succeeds only when the connection (Connect(string, ConnectHandler), Connect(string, string, ConnectHandler)) is made. Otherwise, callback will return with PushTokenRegistrationStatus#PENDING status. Then, you can register push token again by calling SendBird.RegisterAPNSPushTokenForCurrentUser(SendBird.GetPendingPushToken(), RegisterPushTokenWithStatusHandler)
after the connection is done.
gcmRegToken | APNS push token. |
handler | Callback handler. |
|
inlinestatic |
Registers push token for the current User
to receive push notification. To enable push notification and get a token, refer to SendBird Docs.
Push token registration succeeds only when the connection (Connect(string, ConnectHandler), Connect(string, string, ConnectHandler)) is made. Otherwise, callback will return with PushTokenRegistrationStatus#PENDING status. Then, you can register push token again by calling SendBird.RegisterFCMPushTokenForCurrentUser(SendBird.GetPendingPushToken(), RegisterPushTokenWithStatusHandler)
after the connection is done.
gcmRegToken | GCM push token. |
handler | Callback handler. |
delegate void SendBird.SendBirdClient.RegisterPushTokenWithStatusHandler | ( | PushTokenRegistrationStatus | status, |
SendBirdException | e | ||
) |
RegisterPushTokenWithStatus handler. This handler provides callback for RegisterPushTokenForCurrentUser(string, RegisterPushTokenWithStatusHandler).
|
inlinestatic |
Removes all user event handlers added by addUserEventHandler(String, UserEventHandler).
|
inlinestatic |
Removes a channel handler. The deleted handler no longer be notified.
identifier | ID of handler to be removed. |
|
inlinestatic |
Removes a connection handler. The deleted handler no longer be notified.
identifier | ID of handler to be removed. |
|
inlinestatic |
Removes a user event handler. The deleted handler no longer be notified.
identifier | ID of handler to be removed. |
|
inlinestatic |
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.
doNotDisturbOn | Enables option or not. |
startHour | Start hour (0~23). |
startMin | Start minute (0~59). |
endHour | End hour (0~23). |
endMin | End minute (0~59). |
timezone | Timezone. TimeZone#getID() can be used to get the current timezone. |
handler | Callback handler. |
delegate void SendBird.SendBirdClient.SetDoNotDisturbHandler | ( | SendBirdException | e | ) |
SetDoNotDisturb handler. This handler provides callback for SetDoNotDisturb(bool, int, int, int, int, string, SetDoNotDisturbHandler).
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Unregisters push token for the current User
.
gcmRegToken | FCM push token. |
handler | Callback handler. |
|
inlinestatic |
Unregisters push token for the current User
.
gcmRegToken | FCM push token. |
handler | Callback handler. |
|
inlinestatic |
Unregisters all push token bound to the current User
.
handler | Callback handler. |
delegate void SendBird.SendBirdClient.UnregisterPushTokenHandler | ( | SendBirdException | e | ) |
UnregisterPushToken handler. This handler provides callback for UnregisterPushTokenForCurrentUser(string, UnregisterPushTokenHandler) and UnregisterPushTokenAllForCurrentUser(UnregisterPushTokenHandler).
|
inlinestatic |
Updates current User
's information.
nickname | Nickname to be used. |
profileUrl | Image URL to be used. |
handler | Callback handler. |
|
inlinestatic |
Updates current User
's information.
nickname | Nickname to be used. |
profileImage | Image file to be used. |
handler | Callback handler. |
|
inlinestatic |
Upload friend discoveries. com.sendbird.android.SendBird#addUserEventHandler(String, com.sendbird.android.SendBird.UserEventHandler) com.sendbird.android.SendBird#removeUserEventHandler(String) com.sendbird.android.SendBird#removeAllUserEventHandlers() UserEventHandler#onFriendsDiscovered(List)
discoveryMap | The discovery key, friend name map to upload friend discoveries. |
handler | Callback handler. |
delegate void SendBird.SendBirdClient.UploadFriendDiscoveriesHandler | ( | SendBirdException | e | ) |
UploadFriendDiscoveriesHandler handler. This handler provides callback for uploadFriendDiscoveries(Map, UploadFriendDiscoveriesHandler).
delegate void SendBird.SendBirdClient.UserBlockHandler | ( | User | blockedUser, |
SendBirdException | e | ||
) |
UserBlock handler. This provides callback for BlockUser(User, UserBlockHandler) and BlockUserWithUserId(string, UserBlockHandler).
delegate void SendBird.SendBirdClient.UserInfoUpdateHandler | ( | SendBirdException | e | ) |
UserInfoUpdate handler. This provides callback for UpdateCurrentUserInfo(string, string, UserInfoUpdateHandler) and UpdateCurrentUserInfoWithProfileImage(string, File, UserInfoUpdateHandler).
delegate void SendBird.SendBirdClient.UserUnblockHandler | ( | SendBirdException | e | ) |
UserUnblock handler. This provides callback for UnblockUser(User, UserUnblockHandler) and UnblockUserWithUserId(string, UserUnblockHandler).
|
static |
Log
|
staticget |
Returns current application Id.
|
staticget |
|
staticget |
Gets the key to authenticate the url retrieved from FileMessage#getPlainUrl(), User#getPlainProfileImageUrl() and FileMessage.Thumbnail#getPlainUrl(). This key has to be put into the HTTP header to access the url provided by above methods.
|
staticgetset |
Sets logger level.
level | Level of logger. LOGGER_NONE or LOGGER_INFO can be assigned. |
|
staticget |
Returns current OS version.
|
staticget |
Returns current SDK version.