Whats the best way to detect if a user is currently at their computer, ie using it in some way. We have an application that should only issue notifications (banner notifications with a close button) if the user is at their computer.
For example, imagine a stock trading application that alerts the user to various time sensitive information that might be relevant for only a few minutes. If the user is away from their computer, they don’t want to find 20 un-actioned alerts to dismiss.
Technicaly I don’t know how to watch for inactivity but I think you could use timeout for notifications to close themselves after a time interval and/or to limit displayed notifications to few, so the newest one would automaticaly close the oldest one.
From the apple documentation: