Skip to content Skip to sidebar Skip to footer

Log All User Accounts And Passwords?

This is strictly for testing purposes. I am not building this into an application. I am trying to log all the user's saved accounts and passwords AccountManager accountManager

Solution 1:

This happend because you can't obtain the accounts of a device at this way. This only works if you previously add an account to the AccountManager, and you want retrieve it later.

That's the reason why is telling you that haven't got the right permission.

To know the accounts added in the device should use, for example:

AccountManager accountManager = AccountManager.get(this);
Account[] accounts = accountManager.getAccounts();
accountManager.getUserData(accounts[0], AccountManager.KEY_USERDATA);

Hope it helps.

Post a Comment for "Log All User Accounts And Passwords?"