Logout from Google Sign In Integration android

Put following code in any activity. Try this when user clicks on Logout Button:

 Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(
               new ResultCallback<Status>() {
                   @Override
                   public void onResult(Status status) {


                   }
               });

put this in onCreate():

 mGoogleApiClient = new GoogleApiClient.Builder(this)
                .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
                .addApi(Auth.GOOGLE_SIGN_IN_API)
                .build();

then override onStart() like this

 @Override
    protected void onStart() {
        super.onStart();
        mGoogleApiClient.connect();
    }