Code example for PlusClient

Methods: getCurrentPerson

0
	 * @see com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks#onConnected(android.os.Bundle) 
	 */ 
	@Override 
	public void onConnected(Bundle bundle) {
		 
		Person me = plusClient.getCurrentPerson();
		 
		if (shouldConnectOnServer(me)) {
			googlePlusAuthenticationUseCase.setGoogleUserId(me.getId());
			googlePlusAuthenticationUseCase.setLoginMode(true);
			executeUseCase(googlePlusAuthenticationUseCase);
		} 
		 
		getGooglePlusListener().onGooglePlusConnected(me);
	} 
	 
	private Boolean shouldConnectOnServer(Person me) {
		if ((me == null) || (googlePlusAuthenticationUseCase == null)) {
			return false; 
		} else { 
			// If the last authentication was successful for the same uer id, we avoid the request