User Handler
User event handler.
Used for Receive user various related Event Notification, including Subscribe Event Change, Friend added/Delete, Friend application status Change, Friend info Change etc..
all Callback Method all has Default empty Implements, Call only need to override relevant Note Callback i.e. can.
Usage Example:
NCEngine.addUserHandler("USER_ID", object : UserHandler {
override fun onEventChange(events: List<SubscribeInfo>) {
events.forEach { event ->
println("user ${event.userId} Status change")
}
}
override fun onFriendAdd(directionType: FriendDirection, userId: String, name: String, portraitUri: String, operationTime: Long) {
println("Friend added: $userId")
}
override fun onFriendDelete(directionType: FriendDirection, userIds: List<String>, operationTime: Long) {
println("Friend deleted: $userIds")
}
})Content copied to clipboard
Functions
Link copied to clipboard
When Subscribe Event changed When Call.
Link copied to clipboard
public Unit onFriendAdd(FriendDirection directionType, String userId, String name, String portraitUri, Long operationTime)
Friend added callback.
Link copied to clipboard
public Unit onFriendApplicationStatusChanged(String userId, FriendApplicationType applicationType, FriendApplicationStatus applicationStatus, FriendDirection directionType, Long operationTime, String extra)
Friend application status callback event.
Link copied to clipboard
All friends cleared callback event.
Link copied to clipboard
Friend deleted callback.
Link copied to clipboard
public Unit onFriendInfoChangedSync(String userId, String remark, Map<String, String> extProfile, Long operationTime)
Friend info multi-device sync callback event.
Link copied to clipboard
When user In Other device on Subscribe Info occur Change When Call.
Link copied to clipboard
Subscribe Data Sync completed When Call.