Home › Forums › Software Development › User Presence and Eye Gaze Data w/o Calibration › Reply To: User Presence and Eye Gaze Data w/o Calibration
Hi @randr, as I mentioned previously what you are looking for is the User Presence State.
You can either listen to the corresponding event:
using (var eyeXHost = new EyeXHost())
{
eyeXHost.UserPresenceChanged += (s, e) =>
{
bool isValid = e.IsValid; // always invalid at the first callback
UserPresence userPresence = e.Value; // Present | NotPresent | Unknown
Console.WriteLine(“User presence (state-changed event): {0}”, e.ToString);
}
}
Or, ask for the value asynchronously:
using (var eyeXHost = new EyeXHost())
{
Console.WriteLine(“User presence (initial value): {0}”, eyeXHost.UserPresence);
}
Runnable example code is available in the EyeXDotNet samples solution, in Minimal Samples -> MinimalEngineStates -> Program.cs.