In my app, there is an account creation section after login which is normally used for syncing app data with remote data.
But if phone is in unstable state,it wont create account and AccountManager.addAccountExplicitly return false.But when i check the account[],it is returning length as 1
AccountManager accountManager = AccountManager.get(this);
Account[] accounts = accountManager.getAccountsByType("com.sample.account");
if (accounts.length == 0)
{
addAccountAndSync();
}
But app is not shown in "Accounts" in Phone Settings. Anybody came across this situation.?
Was hitting this on N preview (https://code.google.com/p/android/issues/detail?id=210466). Forcing a removeAccount and calling addAccountExplicitly again is a temporary workaround until they fix it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With