I am experimenting with Android AccountManager .
I have an account authentication service that shows a user interface to enter a username / password.
I go to settings / accounts / add account, select a new type of account and present the user interface.
When I click OK, I get the following error
04-24 14:48:29.334: E/AndroidRuntime(386): java.lang.SecurityException: caller uid 10035 is different than the authenticator uid
The only MyAccountAuthenticationService method:
@Override public IBinder onBind(Intent intent) { return new MyAccountAuthenticator(this).getIBinder(); }
MyAccountAuthenticator:
@Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { final Intent intent = new Intent(context, MyAccountCreatorActivity.class); intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response); final Bundle bundle = new Bundle(); bundle.putParcelable(AccountManager.KEY_INTENT, intent); return bundle; }
Snippet MyAccountCreatorActivity onClick
AccountManager accManager = AccountManager.get(this); Account newAccount = new Account(email, MyAccountAuthenticator.ACCOUNT_TYPE); accManager.setPassword(newAccount, password);
An exception is setPassword . I already require all credential permissions. I'm not sure what could be causing this. If you need more code / information, please ask.
Thank.
android accountmanager
usr-local-ΕΨΗΕΛΩΝ Apr 24 2018-12-12T00: 00Z
source share