有没有任何方法来获取用户密码使用谷歌注册android集成

时间:2015-07-09 05:46:02

标签: android google-signin

我的目的是在我的Android应用程序中使用google注册按钮登录时获取用户的用户名和密码。我想将此用户名和密码存储在我的服务器中,以后可以使用这些凭据登录。

是否有任何获取密码的方法。

我的代码是,

if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {
            Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);
            personName = currentPerson.getDisplayName();
            personPhotoUrl = currentPerson.getImage().getUrl();
            String personGooglePlusProfile = currentPerson.getUrl();
            email = Plus.AccountApi.getAccountName(mGoogleApiClient);

            Log.e(TAG, "Name: " + personName + ", plusProfile: "
                    + personGooglePlusProfile + ", email: " + email
                    + ", Image: " + personPhotoUrl);

            // by default the profile url gives 50x50 px image only
            // we can replace the value with whatever dimension we want by
            // replacing sz=X
            personPhotoUrl = personPhotoUrl.substring(0,
                    personPhotoUrl.length() - 2)
                    + PROFILE_PIC_SIZE;

        } else {
            Toast.makeText(getApplicationContext(),
                    "Person information is null", Toast.LENGTH_LONG).show();
        }

1 个答案:

答案 0 :(得分:6)

没有。你不能这样做。即使你可以,你也不应该这样做。