Added command "deactivate_for_duration" that sends the app to background for appropriate amount of seconds, then restores it back to foreground.