when I move my testapp to the SD card, my user account authenticator (com.heidi.AccountStuff) no longer exists.
if I added a new account like this
Account account = new Account("heidi", AccountAuthenticatorService.TYPE);
AccountManager accountManager = AccountManager.get(this);
accountManager.addAccountExplicitly(account, "", null);
it will throw a RuntimeException
java.lang.SecurityException: caller uid XXXXX is different than the authenticator uid
ok, make sense, beacause when I output autatatortypes (with the following code snippet):
for(AuthenticatorDescription d: accountManager.getAuthenticatorTypes()) {
Log.d("add", d.toString());
}
he will output
AuthenticatorDescription {type=com.htc.linkedin}
AuthenticatorDescription {type=com.htc.android.mail.eas}
AuthenticatorDescription {type=com.htc.sync.provider.weather}
AuthenticatorDescription {type=com.htc.android.windowslive}
AuthenticatorDescription {type=com.htc.android.mail}
AuthenticatorDescription {type=com.htc.stock}
AuthenticatorDescription {type=com.htc.lucy.account}
AuthenticatorDescription {type=com.google}
after moving the application to the internal storage, my custom display type on output, for example:
AuthenticatorDescription {type=com.heidi.AccountStuff}
AuthenticatorDescription {type=com.htc.linkedin}
AuthenticatorDescription {type=com.htc.android.mail.eas}
AuthenticatorDescription {type=com.htc.sync.provider.weather}
AuthenticatorDescription {type=com.htc.android.windowslive}
AuthenticatorDescription {type=com.htc.android.mail}
AuthenticatorDescription {type=com.htc.stock}
AuthenticatorDescription {type=com.htc.lucy.account}
AuthenticatorDescription {type=com.google}
any ideas?
source
share