Android上用于Web登录的OAuth 2.0

Android上用于Web登录的OAuth 2.0,android,oauth-2.0,Android,Oauth 2.0,我想从本地android应用程序登录到使用Google Oauth2.0的网页 我在找客户经理,但我认为这行不通 AccountManager am = AccountManager.get(this); Bundle options = new Bundle(); am.getAuthToken( new Account("t....@gmail.com", "com.google"),// Account retrieved usin

我想从本地android应用程序登录到使用Google Oauth2.0的网页

我在找客户经理,但我认为这行不通

AccountManager am = AccountManager.get(this);
        Bundle options = new Bundle();

        am.getAuthToken(
            new Account("t....@gmail.com", "com.google"),// Account retrieved using getAccountsByType()
            " some scope?",  // Auth scope
            options,                        // Authenticator-specific options
            this,                           // Your activity
            new OnTokenAcquired(),          // Callback called when a token is successfully acquired
            new Handler(new OnError())); 
我应该使用什么范围。或者我必须按照不同的方式登录(#2可能会引起您的兴趣)

范围值必须以字符串openid开头,然后包括profile和email中的一个或两个。这些值的任何排列都会起作用,但最常见的是openid电子邮件或openid配置文件

由于您没有包含任何特定的内容,我假设“openid,email”应该适合您,并且可以为您提供可以使用的范围列表