1

I want to set a BroadcastReceiver to get notified when an account is removed from the device. What IntentFilter should I use in my BroadcastReceiver. I couldn't find any related intent.

Thanks

Misagh Emamverdi
  • 3,654
  • 5
  • 33
  • 57
  • 1
    you can try account manager for notification of account removal here is a link for helping you :-http://stackoverflow.com/questions/11214789/does-syncadapter-get-notified-when-accountmanager-removes-account – santoXme Mar 16 '16 at 08:28

1 Answers1

1

With the help of this question, I found that there is an intent called: LOGIN_ACCOUNTS_CHANGED_ACTION. Here is the documentation:

Action sent as a broadcast Intent by the AccountsService when accounts are added, accounts are removed, or an account's credentials (saved password, etc) are changed.

It worked correctly. Also there is another option that is using addOnAccountsUpdatedListener

Community
  • 1
  • 1
Misagh Emamverdi
  • 3,654
  • 5
  • 33
  • 57