开发者

Importing Accounts

开发者 https://www.devze.com 2023-03-03 08:53 出处:网络
everybody. In my application I try to create a new Account, but I got a Se开发者_StackOverflow社区curityException during adding it: \"caller uid 10028 is different than the authenticator\'s uid\". My

everybody. In my application I try to create a new Account, but I got a Se开发者_StackOverflow社区curityException during adding it: "caller uid 10028 is different than the authenticator's uid". My code is:

AccountManager accountManager = null;   

accountManager = AccountManager.get(this);

Account sampleAccount = new Account(ACCOUNT_NAME, ACCOUNT_TYPE);

boolean isSuccess=false;

if (accountManager != null) {

try {

    isSuccess = accountManager.addAccountExplicitly(sampleAccount,
                        ACCOUNT_PASSWORD, null);

} catch (Exception e) {

    Log.e(TAG, e.getMessage());
}

Can anyone help me?


Perhaps this link will help:

http://loganandandy.tumblr.com/post/613041897/caller-uid-is-different

It sounds like the AccountType specified by the constant does not match up with the AccountType defined in the XML of the account-authenticator element, and if they do not match up, it throws this exception.

0

精彩评论

暂无评论...
验证码 换一张
取 消