I'm using an AbstractAccountAuthenticator and I want to single account for my app. So when the user is opting to add a new account for this app I want to prompt a message. I saw other apps use a toast for the message, but for some reasons mine doesn't get displayed.
I display the message like this:
public Bundle addAccount() {
if (accounts.size() > 0) {
Toast.makeText(context, R.string.MSG_ONLY_ONE_ACCOUNT_IS_SUPPORTED, Toast.LENGTH_LONG).show();
return null;
}
}
Any ideas why? I'm checking the accounts number in the addAccount() method from AbstractAccountAuthenticator.