PlusClient revokeAccessAndDisconnect - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for PlusClient revokeAccessAndDisconnect method.

This code example shows how to use the following methods:clearDefaultAccount, connect, isConnected, revokeAccessAndDisconnect
     
    /** 
     * Revoke the access token and completely disconnect from the app. 
     */ 
    public void disconnect(OnAccessRevokedListener listener) {
        if (mPlusClient.isConnected()) {
            mPlusClient.clearDefaultAccount();
        } 
 
        mPlusClient.revokeAccessAndDisconnect(listener);
        resetAfterSignOut(); 
    } 
     
    /** 
     * Reset variables to prepare to connect again. 
     */ 
    private void resetAfterSignOut() { 
        // Reconnect to get a new mPlusClient. 
        mLastConnectionResult = null;
        // Cancel sign in. 

5
CodeRank
This code example shows how to use the following methods:isConnected, revokeAccessAndDisconnect
 
    /** 
     * Revoke access to the current app. 
     */ 
    public void revokeAccessAndDisconnect() { 
        if (mPlusClient.isConnected()) {
            mPlusClient.revokeAccessAndDisconnect(this);
        } 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:isConnected, revokeAccessAndDisconnect
 
    /** 
     * Revoke access to the current app. 
     */ 
    public void revokeAccessAndDisconnect() { 
        if (mPlusClient.isConnected()) {
            mPlusClient.revokeAccessAndDisconnect(this);
        } 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:isConnected, revokeAccessAndDisconnect
 
    /** 
     * Revoke access to the current app. 
     */ 
    public void revokeAccessAndDisconnect() { 
        if (mPlusClient.isConnected()) {
            mPlusClient.revokeAccessAndDisconnect(this);
        } 
    } 
 
	@Override 
	public void onConnected(Bundle connectionHint) {
        // Successful connection! 
        mLastConnectionResult = CONNECTION_RESULT_SUCCESS;
        mRequestCode = INVALID_REQUEST_CODE;
        mIsConnecting = false;
        hideProgressDialog(); 
 
        Activity activity = getActivity();
        if (activity instanceof OnSignedInListener) {
4
CodeRank
This code example shows how to use the following methods:revokeAccessAndDisconnect
		public void onConnectionFailed(ConnectionResult arg0) {
		} 
		 
		@Override 
		public void onConnected(Bundle arg0) {
			plusClient.revokeAccessAndDisconnect(this);
		} 
		 
		@Override 
		public void onDisconnected() { 
		} 
		 
		public void setPlusClient(PlusClient plusClient) {
			this.plusClient = plusClient;
		} 
	} 
} 
4
CodeRank
This code example shows how to use the following methods:isConnected, revokeAccessAndDisconnect
 
    /** 
     * Revoke access to the current app. 
     */ 
    public void revokeAccessAndDisconnect() { 
        if (mPlusClient.isConnected()) {
            mPlusClient.revokeAccessAndDisconnect(this);
        } 
    } 
} 
4
CodeRank

Related PlusClient revokeAccessAndDisconnect Questions & Answers:

revokeAccessAndDisconnect Method Overview
Revokes access given to the current application.
See Code Examples for other Android PlusClient Methods: