Index

HardwareButtonsHomeState

new HardwareButtonsHomeState()

We enter the home state when the user presses the Home button
We can fire home, holdhome, 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

holdhome

When the user holds Home button more than HOLD_INTERVAL.

home

When the user releases Home button before HOLD_INTERVAL.

home+sleep

When the user presses Sleep button, before HOLD_INTERVAL,
while holding the Home button.