In the AccountManager tutorial Remembering Your User, it's recommended:
If there's more than one
Account
in the array, you should present a dialog asking the user to select one.
What's the best way to do this? I have a solution in mind, but if there are other good examples from the community, it seems like this is the kind of boilerplate code that could be shared and easily re-used by others.
I use this code. It show an dialog, so enduser can choose one of the google account.
From Android 4.0 (API level 14) onwards, launching an activity with an intent shown below, shows account chooser.
For devices older than 4.0,
use https://github.com/frakbot/Android-AccountChooser