Skip to content

Instantly share code, notes, and snippets.

@samyak-jain
Created November 14, 2018 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samyak-jain/8b12c8d1cad41ab2904641099c8d7ac3 to your computer and use it in GitHub Desktop.
Save samyak-jain/8b12c8d1cad41ab2904641099c8d7ac3 to your computer and use it in GitHub Desktop.
private void initUI() {
AGApplication.the().getmAgoraAPI().channelJoin(channelName);
}
public void onClickLogin(View v) {
if (enableLoginBtnClick) {
account = textAccountName.getText().toString();
if (account == null || account.equals("")) {
ToastUtils.show(new WeakReference<Context>(LoginActivity.this), getString(R.string.str_msg_not_empty));
} else if (account.length() >= Constant.MAX_INPUT_NAME_LENGTH) {
ToastUtils.show(new WeakReference<Context>(LoginActivity.this), getString(R.string.str_msg_not_128));
} else if (account.contains(" ")) {
ToastUtils.show(new WeakReference<Context>(LoginActivity.this), getString(R.string.str_msg_not_contains_space));
} else {
enableLoginBtnClick = false;
AGApplication.the().getmAgoraAPI().login2(appId, account, "_no_need_token", 0, "", 5, 1);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment