Added a check when publishing an event

no need to send the event if the screen is on
Merge pull request #1 from yakirp/ACTION_USER_PRESENT-branch

Added a check when publishing an event