Public Member Functions | |
abstract boolean | initSDK (Context context, int sdkAppID, V2TIMSDKConfig config) |
abstract void | unInitSDK () |
abstract void | addIMSDKListener (V2TIMSDKListener listener) |
abstract void | removeIMSDKListener (V2TIMSDKListener listener) |
abstract String | getVersion () |
abstract long | getServerTime () |
abstract boolean | initSDK (Context context, int sdkAppID, V2TIMSDKConfig config, V2TIMSDKListener listener) |
abstract void | login (String userID, String userSig, V2TIMCallback callback) |
abstract void | logout (V2TIMCallback callback) |
abstract String | getLoginUser () |
abstract int | getLoginStatus () |
abstract void | addSimpleMsgListener (V2TIMSimpleMsgListener v2TIMSimpleMsgListener) |
abstract void | removeSimpleMsgListener (V2TIMSimpleMsgListener v2TIMSimpleMsgListener) |
abstract String | sendC2CTextMessage (String text, String userID, V2TIMValueCallback< V2TIMMessage > callback) |
abstract String | sendC2CCustomMessage (byte[] customData, String userID, V2TIMValueCallback< V2TIMMessage > callback) |
abstract String | sendGroupTextMessage (String text, String groupID, int priority, V2TIMValueCallback< V2TIMMessage > callback) |
abstract String | sendGroupCustomMessage (byte[] customData, String groupID, int priority, V2TIMValueCallback< V2TIMMessage > callback) |
abstract void | setGroupListener (V2TIMGroupListener listener) |
abstract void | addGroupListener (V2TIMGroupListener listener) |
abstract void | removeGroupListener (V2TIMGroupListener listener) |
abstract void | createGroup (String groupType, String groupID, String groupName, V2TIMValueCallback< String > callback) |
abstract void | joinGroup (String groupID, String message, V2TIMCallback callback) |
abstract void | quitGroup (String groupID, final V2TIMCallback callback) |
abstract void | dismissGroup (String groupID, final V2TIMCallback callback) |
abstract void | getUsersInfo (List< String > userIDList, V2TIMValueCallback< List< V2TIMUserFullInfo >> callback) |
abstract void | setSelfInfo (V2TIMUserFullInfo info, V2TIMCallback callback) |
abstract void | subscribeUserInfo (List< String > userIDList, V2TIMCallback callback) |
abstract void | unsubscribeUserInfo (List< String > userIDList, V2TIMCallback callback) |
abstract void | getUserStatus (List< String > userIDList, V2TIMValueCallback< List< V2TIMUserStatus >> callback) |
abstract void | setSelfStatus (V2TIMUserStatus status, V2TIMCallback callback) |
abstract void | subscribeUserStatus (List< String > userIDList, V2TIMCallback callback) |
abstract void | unsubscribeUserStatus (List< String > userIDList, V2TIMCallback callback) |
abstract void | callExperimentalAPI (String api, Object param, V2TIMValueCallback< Object > callback) |
Static Public Member Functions | |
static V2TIMManager | getInstance () |
static V2TIMMessageManager | getMessageManager () |
static V2TIMGroupManager | getGroupManager () |
static V2TIMCommunityManager | getCommunityManager () |
static V2TIMConversationManager | getConversationManager () |
static V2TIMFriendshipManager | getFriendshipManager () |
static V2TIMOfflinePushManager | getOfflinePushManager () |
static V2TIMSignalingManager | getSignalingManager () |
Static Public Attributes | |
static final int | V2TIM_STATUS_LOGINED = 1 |
static final int | V2TIM_STATUS_LOGINING = 2 |
static final int | V2TIM_STATUS_LOGOUT = 3 |
static final String | GROUP_TYPE_WORK = "Work" |
static final String | GROUP_TYPE_PUBLIC = "Public" |
static final String | GROUP_TYPE_MEETING = "Meeting" |
static final String | GROUP_TYPE_AVCHATROOM = "AVChatRoom" |
static final String | GROUP_TYPE_COMMUNITY = "Community" |
|
inlinestatic |
1.1 Get the V2TIMManager instance
|
abstract |
1.2 Initialize the SDK
context | Context |
sdkAppID | App ID. This field is required. You can obtain the app ID from the console. |
config | Configuration information |
|
abstract |
1.3 Uninitialize the SDK
|
abstract |
1.4 Add a Chat listener
|
abstract |
1.5 Remove a Chat listener
|
abstract |
1.6 Get the SDK version
|
abstract |
1.7 Get the current server time
|
abstract |
1.8 Initialize the SDK
context | Context |
sdkAppID | App ID. This field is required. You can obtain the app ID from the console. |
config | Configuration information |
listener | SDK callback |
|
abstract |
2.1 Log in
userID and userSig must be set for login. For the generation of userSig, please see UserSig backend API.
|
abstract |
2.2 Log out
In the case of switching accounts, after the user logs out, they can log in again only after a logout callback is received (whether the logout succeeds or fails).
|
abstract |
2.3 Get the logged in user
|
abstract |
2.4 Get the login status
If the user is already in the "logged in" or "logging in" state, do not frequently call the login API to log in.
|
abstract |
3.1 Set the event listener for simple messages (text messages and custom messages)
|
abstract |
3.2 Remove the event listener for simple messages (text messages and custom messages)
|
abstract |
3.3 Send a one-to-one text message (up to 12 KB)
Text messages support sensitive word filtering on the cloud. For example, if a text message sent by a user contains sensitive words, the callback will return the 80001 error code.
|
abstract |
3.4 Send a one-to-one custom (signaling) message (up to 12 KB)
A custom message is essentially a binary buffer which allows you to customize your message format (often used to send signaling). Custom messages do not support sensitive word filtering on the cloud.
|
abstract |
3.5 Send a group text message (up to 12 KB)
priority | Message priority. There is no guarantee that each message will reach all users, but higher-priority messages will have a higher delivery success rate.
|
|
abstract |
3.6 Send a group custom (signaling) message (up to 12 KB)
priority | Message priority. There is no guarantee that each message will reach all users, but higher-priority messages will have a higher delivery success rate.
|
|
abstract |
4.1 Set the group listener
|
abstract |
4.2 Add the group listener
|
abstract |
4.3 Remove the group listener
|
abstract |
4.4 Create a group
groupType | Group type. The following group types are preset in the SDK. You can also customize group types in the console:
|
groupID | Custom group ID. "null" can be passed in. When "null" is passed in, the system automatically assigns a group ID and returns it via a callback. Custom group ID of "Community" must start with "@TGS#_". |
groupName | Group name. The value cannot be "null". The maximum length is 100 bytes, using UTF-8 encoding, and 1 Chinese character occupies 3 bytes. |
|
abstract |
4.5 Join a group
|
abstract |
4.6 Quit a group
|
abstract |
4.7 Delete a group
|
abstract |
5.1 Get user profiles
|
abstract |
5.2 Modify one's own user profile
|
abstract |
5.3 Subscribe to user profiles (supported only in Chat Premium 7.4 and later versions)
userIDList |
|
abstract |
5.4 Unsubscribe user profile (supported only in Chat Premium 7.4 and later versions)
userIDList | Identifiers for users whose profiles you want to unsubscribe from. If userIDList is empty, all subscriptions will be canceled. |
|
abstract |
5.5 Get user status information (supported only in Chat Premium 6.3 and later versions)
userIDList | List of identifier of the users whose information is to be obtained. |
|
abstract |
5.6 Set your own user status (supported only in 6.3 and later versions)
|
abstract |
5.7 Subscribe to user status (supported only in Chat Premium 6.3 and later versions)
userIDList | Identifiers for users whose status you want to subscribe to. |
|
abstract |
5.8 Unsubscribe from user status (supported only in Chat Premium 6.3 and later versions)
userIDList | Identifiers for users whose status you want to unsubscribe from. If useridList is empty, all subscriptions will be canceled. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
abstract |
Experimental API
api | API name |
param | API parameter |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |