new HardwareButtonsSleepState()
We enter the sleep state when the user presses the Sleep button
We can fire sleep, holdsleep, or homesleep events from this state.
Methods
-
enter()
-
Entering the state.
-
exit()
-
Leaving the state.
-
process(type)
-
Process the event, maybe transition the state.
Parameters:
Name Type Description type String Name of the event to process.
Events
-
holdsleep
-
When the user holds Sleep button more than HOLD_INTERVAL.
-
home+sleep
-
When the user presses Home button, before HOLD_INTERVAL,
while holding the Sleep button. -
sleep
-
When the user releases Sleep button before HOLD_INTERVAL.