Android studio 如何从Google帐户获取数据
我的应用程序有问题。。。 我可以从谷歌账户上获取数据。。。 我在谷歌上试过很多代码来解决这个问题。。但结果仍然无效 有人能帮我吗 这是我的密码Android studio 如何从Google帐户获取数据,android-studio,googlesigninaccount,Android Studio,Googlesigninaccount,我的应用程序有问题。。。 我可以从谷歌账户上获取数据。。。 我在谷歌上试过很多代码来解决这个问题。。但结果仍然无效 有人能帮我吗 这是我的密码 GoogleSignInAccount acct = GoogleSignIn.getLastSignedInAccount(MainActivity.this); if (acct != null) { String personName = acct.getDisplayName(); String perso
GoogleSignInAccount acct = GoogleSignIn.getLastSignedInAccount(MainActivity.this);
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();
txtUser.setText(personName);
txtEmail.setText(personEmail);
Glide.with(MainActivity.this).load(personPhoto).into(imgUser);
}