Search code examples
androidandroid-intentaccountmanager

Build-in Intent to Pick an account


Is there a build-in Intent I can use to let the user pick an account from the accountmanager or do I have to build the accountpicker activity myself?


Solution

  • Since API 14+ you can use the #newChooseAccountIntent(..) in the account manager. Before that it was all manual.

    There was a "ChooseAccountActivity" at least as early as in 2.3 I believe, but this is an unpublished API - if you google it you should find the class though - it should be possible to use it if you're careful.

    (Or just go and lift the code from the SDK and put it in your own project)