How to detect switching between users

后端 未结 1 1616
清酒与你
清酒与你 2020-12-28 18:22

I have a service running in foreground mode and I\'d like to detect switching between user sessions on tablets running Android 4.2 or above.

Is there any broadcast r

相关标签:
1条回答
  • 2020-12-28 18:44

    Try ACTION_USER_FOREGROUND and ACTION_USER_BACKGROUND. I have not used them, but they were added in API Level 17, and their description seems like it may help.

    0 讨论(0)
提交回复
热议问题