我一生都无法弄清楚为什么,但我的谷歌帐户意图没有出现在弹出对话框中。这是我的代码,如果需要,我可以提供更多。
public class MainMenu extends ActionBarActivity implements ActionBar.TabListener {
//... Fragment Code
Intent googlePicker = AccountPicker.newChooseAccountIntent(null, null,
new String[]{GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE}, true, null, null, null, null);
startActivityForResult(googlePicker, 1);
}
@Override
protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
if (requestCode == 1 && resultCode == RESULT_OK) {
String accountName = data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);
Log.d(this.getClass().toString(), "Account Name=" + accountName);
}
}