3

Google ドライブの Android で AccountManager を使用して認証トークンを取得しようとしています:

    String AUTH_TOKEN_TYPE = "oauth2:https://www.googleapis.com/auth/drive";

    GoogleAccountManager accountManager = credential.getGoogleAccountManager();
    accountManager.getAccountManager().getAuthToken(
                    credential.getSelectedAccount(),        // Account retrieved using getAccountsByType("com.google")
                    AUTH_TOKEN_TYPE,                        // Auth Token Type
                    null,                                   // Authenticator-specific options
                    this,                                   // Your activity
                    new OnTokenAcquired(),                  // Callback called when a token is successfully acquired
                    new Handler(new OnAuthTokenError()));   // Callback called if an error occurs

そして、logcat からエラー コードを取得します。

01-07 11:03:13.454 I/GLSUser ( 4608): GLS error: **INVALID_LANGUAGE** xxxx@gmail.com oauth2:https://www.googleapis.com/auth/drive
01-07 11:03:13.454 V/GoogleLoginService( 4608): Returning error intent with: ComponentInfo{com.google.android.gsf.login/com.google.android.gsf.login.LoginActivity}

ここで「INVALID_LANGUAGE」と表示されている理由がよくわかりません。ありがとう。

4

0 に答える 0