views:

32

answers:

0

Hi, i need help to delete accounts which are displayed in “account and sync” from my app. i want to delete google account, facebook account, corporate account, twitter account only from mobile.I'm using following code but google account(primary) didnt get deleted.whereas all other accounts like twitter, facebook got deleted.

    android.accounts.Account[] accounts =
                    AccountManager.get(mContext).getAccounts();
         for (android.accounts.Account account: accounts) {
              AccountManagerFuture<Boolean> bool = AccountManager.get(mContext).removeAccount(account, null, null);
              Log.i("parul", "bool: " + bool);
         }           

It would be great help if u can suggest something to resolve my problem.