New Google Sign in Android

Google Sign in with android Studio

Try this :

    @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);

// Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);
if (requestCode == REQ_CODE) {
GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
handleSignInResult(result);

// G+
Person person = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);
System.out.println("Display Name: " + person.getDisplayName());
System.out.println("Gender: " + person.getGender());
System.out.println("AboutMe: " + person.getAboutMe());
System.out.println("Birthday: " + person.getBirthday());
System.out.println("Current Location: " + person.getCurrentLocation());
System.out.println("Language: " + person.getLanguage());

}
}

New Google Sign-In API - refresh token

I ended up using the old GoogleSignInApi's silent sign in feature for this. I've tested and if I use the New Google Sign In api for the sign in, the old one will still be able to perform the silent sign in.

It would be nice, if the new one had this silent sign in feature, but for now it looks like if you would like this "refresh" feature, you're still required to use the old api.

Google sign-in does not work for Fitness API on Android

hi @piet90 I was able to work around the issue, I followed this: https://github.com/android/fit-samples/issues/58

I think it works in all cases, you need to delete your project in Google Console and recover it after.



Related Topics



Leave a reply



Submit