Created
June 29, 2022 07:05
-
-
Save larryluoo/e57efaa1f7699447b460bd91670ba36e to your computer and use it in GitHub Desktop.
login
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
ZegoUserInfo user = new ZegoUserInfo(); | |
// Set the user related properties. | |
user.setUserID("USER_ID"); | |
user.setUserName("USER_NAME"); | |
String token = "xxx"; // The token you get from your app server. | |
/** | |
* User to log in. | |
* @param userInfo refers to the user information. You only need to enter the user ID and username. | |
* @param token refers to the authentication token. | |
* @param callback refers to the callback for log in. | |
*/ | |
ZegoRoomManager.getInstance().userService.login(user, token, new ZegoRoomCallback() { | |
@Override | |
public void roomCallback(int errorCode) { | |
// Callback for the login result. | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment