I have a requirement to be able to track how much a user interacts with the different applications running on their machine. What seemed logical to me was to keep a log of window focus events with timestamps which would tell you what applications were in focus over the course of the day.
We have some other things to do in this application that would be straightforward in Java. However I haven't done any GUI programming in Java so I'm not sure if it's possible to get information about OS-level windows through the awt API. Is that even possible? Would there be another way to do this through JNI or would a native application be required to do this?
PS: I know that this requirement sounds a little nefarious but I am only here to determine whether or not this is technically possible. Please don't shoot the messenger, this wasn't my idea. :)