You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To receive the account change broadcast, you'll need to register a broadcast receiver. It’s recommended to register your broadcast receiver via the Context. For more information about Context, see [Context-registered receivers](https://developer.android.com/guide/components/broadcasts#context-registered-receivers)
208
+
### Receivebroadcastto detect global sign out initiated from other applications
209
209
210
-
When an account change broadcast is received, immediately get the signed in user and determine if a user has changed on the device. If a change is detected, initiate data cleanup for previously signed-in account. It is recommended to properly stop any operations and do data cleanup.
210
+
To receive the account change broadcast, you'll need to register a broadcast receiver. It’s recommended to register your broadcast receiver via the [Context-registered receivers](https://developer.android.com/guide/components/broadcasts#context-registered-receivers).
211
211
212
-
The following code snippet shows how you could register a broadcast receiver.
212
+
When an account change broadcast is received, immediately [get the signed in user and determine if a user has changed on the device](#get-the-signed-in-user-and-determine-if-a-user-has-changed-on-the-device). If a change is detected, initiate data cleanup for previously signed-in account. It is recommended to properly stop any operations and do data cleanup.
213
+
214
+
The following code snippet shows how you could register a broadcast receiver.
213
215
214
216
```java
215
-
private static final String CURRENT_ACCOUNT_CHANGED_BROADCAST_IDENTIFIER = "com.microsoft.identity.client.sharedmode.CURRENT_ACCOUNT_CHANGED";
0 commit comments