0

Firstly this is not a duplicate of this question: JavaFX 2 User Idle Detection as that question is only concerned if the user is not using their application. My question is about knowing if the user is using any application on the computer or none at all.

I think after a few attempts the easiest way to ask this question is to provide a scenario. User logs on to the PC, and my application is started.

The user might make some changes to my application and then minimize the window and start working on some project, a word document or what ever. All this time my application is idle as the user is not using it, but they are still using the computer.

After 15 or 20 minutes working on their word document they get up and walk to the kitchen to make a sandwich.

After they have been away from the computer for a short time they come back and start work on the word document again.

How does my javafx application detect that they have been away in the kitchen for 5 or 6 minutes and pop up a window to ask for input when they return? The user should not need to maximize my application window manually, it should happen automatically.

Community
  • 1
  • 1
Rob
  • 2,511
  • 2
  • 20
  • 31
  • I don't think you can, at least not without interacting with native code. I wonder why you care, though? I frequently use my laptop every 3-4 minutes over a period of 10-12 hours but have apps running which I ignore for that entire time frame. What's the semantic difference between ignoring the app and ignoring the computer? – James_D Dec 04 '14 at 04:36
  • Yes, I have seen an example using JNA and awt, but was hopping for a JavaFX example. The usage is when people are working on multiple projects, and multiple people working on multiple projects. So for example UserA works on P1, P2 & P3, UserB works on P2, P3 & P4. UserA is at the moment on P1, but is asked By UserB something about P2 and goes to their desk. Comes back 15 mins later and resumes Work on P1, the app prompts them as to what the last 15 mins was used on so that P1 does not get billed for P2 time. – Rob Dec 04 '14 at 18:34

0 Answers0