Created
July 29, 2022 07:35
-
-
Save larryluoo/a3fc3dc6f383a3d078f585534e0b7732 to your computer and use it in GitHub Desktop.
loginRoom
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
/** create a user */ | |
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