Skip to content

Instantly share code, notes, and snippets.

@sys1yagi
Last active Feb 28, 2019
Embed
What would you like to do?
// deprecatedだけど新しいのは API 23からなので仕方ない
val intent = AccountManager.newChooseAccountIntent(
null,
null,
arrayOf("com.google"),
true,
null,
null,
null,
null
)
// onActivityResultで取り出す
val name = data?.getStringExtra(AccountManager.KEY_ACCOUNT_NAME)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment