ALUserSession - Getting Started
If you are developing an Activity that wants to take advantage of persistent user data, this is for you.
Monitoring the state of users’ sessions ¶
At any time, if you want to know what sessions are currently open, use the method
Monitoring the focused user ¶
At any time, if you want to know who is the currently focused user, use the method
You can also monitor continously the changes of focused user with the signal
Getting/Setting user data ¶
Specific data about users can be stored or accessed using their UserSession IDs via ALUserInfo API.
Using user sessions to exit an activity ¶
offers no functionality when there is nobody to talk to,
you could decide to exit it when the event
Handling the anonymous user ¶
If the focused user is 0, they are the anonymous user, meaning ALAutonomousLife failed to identify them. Usually this is because a good facial image could not be acquired. ALAutonomousLife will try every 3 seconds to identify, or create an identification for this user. After that succeeds, the real user will be focused.
If your activity is in a state where it requires verifying accurately who the focused user is, you should ask the user to take a good look at the robot.