Implement switching between stayup-sleep-wakeup activity