I would like to retrieve passwords of all accounts (Facebook, Dropbox, Gmail, etc) associated in my Android phone... I have tried the coding below, but not able to get the passwords...
AccountManager am = AccountManager.get(this);
Account [] acc = am.getAccounts();
if (acc.length > 0){
for (int i=0; i<acc.length; i++){
String password = am.getPassword(acc[i]);
listedAcc += acc[i] + " Password:" + password.toString() + "\n\n";
}
accounts.setText(listedAcc.toString());
Can someone troubleshoot this for me... Thanks