Created
July 21, 2022 12:36
-
-
Save larryluoo/473fd620452389e36be3c361d92e6b62 to your computer and use it in GitHub Desktop.
login room
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZegoUser user = new ZegoUser("user1"); | |
ZegoRoomConfig roomConfig = new ZegoRoomConfig(); | |
/** Token is generated by the user's own server. For an easier and convenient debugging, you can get a temporary token from the ZEGOCLOUD Admin Console */ | |
roomConfig.token = "xxxx"; | |
/** onRoomUserUpdate callback can be received only by passing in a ZegoRoomConfig whose "isUserStatusNotify" parameter value is "true".*/ | |
roomConfig.isUserStatusNotify = true; | |
/** log in to a room */ | |
engine.loginRoom("room1", user, roomConfig, (int error, JSONObject extendedData)->{ | |
// (Optional callback) The result of logging in to the room. If you only pay attention to the login result, you can use this callback. | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment