GoogleAccount getAccountInfo ( String accountId ) throws IOException { Credential credential = impl_getStoredCredential ( accountId ) ; if ( credential == null ) { throw new UnsupportedOperationException ( "The account has not been authorized yet!" ) ; } Userinfoplus info = impl_requestUserInfo ( credential ) ; GoogleAccount account = new GoogleAccount ( ) ; account . setId ( accountId ) ; account . setName ( info . getName ( ) ) ; return account ; }
Requests the user info for the given account . This requires previous authorization from the user so this might start the process .