public Boolean accountTypeEnabled(AccountDetails.Type type) { if (type == AccountDetails.Type.Anonymous) { return ChatSDK.config().anonymousLoginEnabled; } else if (type == AccountDetails.Type.Username || type == AccountDetails.Type.Register) { return true; } else if (ChatSDK.socialLogin() != null) { return ChatSDK.socialLogin().accountTypeEnabled(type); } else { return false; } }
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(ChatSDK.socialLogin() != null) { ChatSDK.socialLogin().onActivityResult(requestCode, resultCode, data); } }
ChatSDK.socialLogin().loginWithTwitter(this).doOnError(error) .observeOn(AndroidSchedulers.mainThread()) .doFinally(doFinally) ChatSDK.socialLogin().loginWithFacebook(this).doOnError(error) .observeOn(AndroidSchedulers.mainThread()) .doFinally(doFinally) ChatSDK.socialLogin().loginWithGoogle(this).doOnError(error) .observeOn(AndroidSchedulers.mainThread()) .doFinally(doFinally)
ChatSDK.socialLogin().logout();