title: Retrieving user information with Google sign in
body: <pre><code>GoogleSignInAccount acct = GoogleSignIn.getLastSignedInAccount(getActivity());
  if (acct != null) {
    String personName = acct.getDisplayName();
    String personGivenName = acct.getGivenName();
    String personFamilyName = acct.getFamilyName();
    String personEmail = acct.getEmail();
    String personId = acct.getId();
    Uri personPhoto = acct.getPhotoUrl();
  } 
  </code></pre>
  
  <p>I used google auth. for my app. I need to retrieve info of the signed-in user. Especially photo. But when I try to use that code block the <strong>getActivity()</strong> gives error says <em>"none of the following functions can be called with the arguments supplied"</em> how can I use that. Also answers are can be in java.</p>