Using this code throws that exception and doesn't add created account into account manager.
AccountManager am = AccountManager.get(activity);
Account acc = new Account(name,activity.getString(R.string.account_type));
am.addAccountExplicitly(acc,"Password",null);
I have followed this - http://developer.android.com/training/id-auth/custom_auth.html
Any idea why it is caused?
//edit: Caused by: java.lang.SecurityException: caller uid 10035 is different than the authenticator's uid