views:

49

answers:

1

Hello guys,

I am writing an application that is hidden most of the time but sometimes it should pop up on the user's desktop. (It is in cocoa and objective-c)

I don't want to disturb my dear users when they are busy e.g. watching a movie or actively chating with friends etc. I would like that my app pops up only when user is not busy with other work.

So, is there is a way to detect that "free" time?

Thank you very much in advance for all your brilliant ideas!

+3  A: 

You might take a look at the source for Growl. It has its notion of an "idle user" which it uses to condition what action to take with regards to posting notifications. There may be useful code there.

Ned Deily
Yep check the source code for growl, im fairly sure it is publicly accessable.
Jacob