How to get unread emails from email app(not Gmail)
<p>im working on a Widget that displays the unread E-Mail Count of Gmail and other E-Mail Accounts set in the Smartphone. I'm using the Google-Mail Api for Gmail and it works finde, but i didnt get how to work with the normal E-Mail App. </p>

<p>I tried to use the Account Manager to get Login-Credentials and retrieve infromation by myself, but it didnt run because i cant get any password or so. Just Auth-Tokens. I cant find any solution on google on how to work with normal email accounts their are not from google-mail.</p>

<p>UPDATE:
Im trying to get the password with this function but i get an Error:
        Account[] accounts = AccountManager.get(context).getAccounts();
        for(Account account : accounts){
            String test = AccountManager.get(context).getPassword(account);
            System.out.println(account.name+" "+test);
        }</p>

<p>"cannot get secrets for Accounts of type: com.android.exchange"</p>

<p>Thanks,
j Doe ;)</p>