ACTION_USER_STOPPING constant
Broadcast sent when a user is going to be stopped. Carries an extra EXTRA_USER_HANDLE that has the userHandle of the user. This is only sent to registered receivers, not manifest receivers. It is sent to all users (including the one that is being stopped). You must hold {@link android.Manifest.permission#INTERACT_ACROSS_USERS} to receive this broadcast. The user will not stop until all receivers have handled the broadcast. This is sent as a background broadcast, since its result is not part of the primary UX flow; to safely keep track of started/stopped state of a user you can use this in conjunction with {@link #ACTION_USER_STARTING}. It is not generally safe to use with other user state broadcasts since those are foreground broadcasts so can execute in a different order. @hide
Implementation
static const String ACTION_USER_STOPPING =
"android.intent.action.USER_STOPPING";