Skip to content

Instantly share code, notes, and snippets.

@samyak-jain
Last active November 14, 2018 17:40
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/ee25f7cec20b62aa27cc0c786d79f475 to your computer and use it in GitHub Desktop.
Save samyak-jain/ee25f7cec20b62aa27cc0c786d79f475 to your computer and use it in GitHub Desktop.
@Override
protected void onResume() {
super.onResume();
addCallback();
enableLoginBtnClick = true;
StringBuffer version = new StringBuffer("" + AGApplication.the().getmAgoraAPI().getSdkVersion());
if (version.length() >= 8) {
String strVersion = "version " + version.charAt(2) + "." + version.charAt(4) + "." + version.charAt(6);
textViewVersion.setText(strVersion);
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) {
if (data != null && data.getStringExtra("result").equals("finish")) {
finish();
}
}
}
@Override
public void onBackPressed() {
AGApplication.the().getmAgoraAPI().logout();
Constant.cleanMessageListBeanList();
super.onBackPressed();
}
public void onClickFinish(View v) {
AGApplication.the().getmAgoraAPI().logout();
/** logout clear messagelist**/
Constant.cleanMessageListBeanList();
finish();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment