public void signout(View v) { Auth.GoogleSignInApi.signOut(mGoogleApiClient) .setResultCallback( new ResultCallback<Status>() { @Override public void onResult(Status status) { updateUI(false); } }); }
private void signOut() { Auth.GoogleSignInApi.signOut(mGoogleApiClient) .setResultCallback( new ResultCallback<Status>() { @Override public void onResult(Status status) { showSnackBar(getString(R.string.signed_out)); showSignInButton(true); showShortenBox(false); } }); }
private void signOutUser() { Auth.GoogleSignInApi.signOut(mGoogleApiClient) .setResultCallback( new ResultCallback<Status>() { @Override public void onResult(Status status) { // [START_EXCLUDE] // updateUI(false); // [END_EXCLUDE] } }); btnSignIn.setVisibility(View.VISIBLE); }
private void signOut() { // Firebase sign out mAuth.signOut(); // Google sign out Auth.GoogleSignInApi.signOut(mGoogleApiClient) .setResultCallback( new ResultCallback<Status>() { @Override public void onResult(@NonNull Status status) { updateUI(null); } }); }
/** * *********************************************************************************************** * Method: logout Description: Logs out the user from their current session and starts * MainSignInActivity. Also disconnects the mGoogleApiClient if connected and provider is Google * Parameters: N/A Returned: N/A * ********************************************************************************************** */ protected void logout() { /* Logout if mProvider is not null */ if (mProvider != null) { // unauthorize the firebase user mFirebaseRef.unauth(); bUsingOffline = true; if (mProvider.equals(Constants.GOOGLE_PROVIDER)) { /* Logout from Google+ */ Auth.GoogleSignInApi.signOut(mGoogleApiClient) .setResultCallback( new ResultCallback<Status>() { @Override public void onResult(Status status) { // nothing } }); } } }