Reputation: 9121
I have a little program where i need to somehow detect when the user just closes down his/her laptop screen. So; not turning of the entire computer but rather just closing down the screen.
Ive got a chat program and i need to make the user go offline when the screen is closed. For some reason my current socket connection is still alive when i just close down the screen.
Any ideas?
Upvotes: 3
Views: 679
Reputation: 1094
You can give a look to that library :
http://www.codeproject.com/Articles/6590/PC-StandBy-Detector-for-Java-Apps
It is really simple to use and worked well for me. (Window only)
Upvotes: 2