How to list out all the accounts (Facebook, Twitter, Gmail, etc) in Android?
<p>I am planning to write a simple code which lists out all the accounts associated in my Android phone such as Facebook, Twitter, Gmail, Dropbox and so on... </p>

<pre><code>    AccountManager am = AccountManager.get(this);
    Account [] acc = am.getAccounts();
    if (acc.length &gt; 0){
        for (int i=0; i&lt;acc.length; i++){
            listedAcc = acc[i] + "\n";
        }
        accounts.setText(listedAcc.toString());
</code></pre>

<p>After running the above coding, the TextView "accounts" only shows me </p>

<pre><code>    Account {name=abc@hotmail.com,
             type=com.android.exchange}
</code></pre>

<p>How I am going to do in order to list out all other accounts in my phone... Thanks...</p>
