Code example for UserRecoverableAuthException

Methods: getIntent

0
				String token = GoogleAuthUtil.getToken(mActivity, mEmail,"oauth2:https://www.googleapis.com/auth/userinfo.profile");
				Log.i("MainActivity", token);
				return token;
 
			} catch (UserRecoverableAuthException userRecoverableException) {
				mActivity.startActivityForResult(userRecoverableException.getIntent(),USER_RECOVERABLE_AUTH);
			} catch (Exception e) {
				e.printStackTrace();
			} 
			return null; 
		} 
 
		@Override 
		protected void onPostExecute(String result) {
			if (result != null)
				txtToken.setText(result);
		} 
 
	} 
} 
Experience pair programming with AI  Get Codota for Java