Support device states
As you transition through the module lifecycle, your device takes on various device states. These states dictate what your device can and can’t do at a given moment in time. The ACK Device SDK uses theACKUser_OnLifecycleStateChange callback in your application to indicate the transition between the states.
For more details about designing your device to handle the following ACK_LifecycleState variables, see Device States.
| Device state SDK variable | Description |
|---|---|
ACK_LIFECYCLE_UNAVAILABLE | ACK module isn’t available. |
ACK_LIFECYCLE_BOOTED | ACK module is booted. |
ACK_LIFECYCLE_FACTORY_RESET_IN_PROGRESS | ACK module is processing a factory reset. |
ACK_LIFECYCLE_NOT_REGISTERED | ACK device isn’t registered to Alexa and isn’t available for device setup. |
ACK_LIFECYCLE_IN_SETUP_MODE | ACK device isn’t registered to Alexa and is available for device setup. |
ACK_LIFECYCLE_CONNECTED_TO_ALEXA | ACK device is registered with Alexa and established a connection to the Alexa services. |
ACK_LIFECYCLE_NOT_CONNECTED_TO_ALEXA | ACK device is registered with Alexa but hasn’t established a connection to the Alexa services. |
ACKUser_OnLifecycleStateChange callback that prints out the current state of a device.
Support user-initiated triggers
A user-initiated trigger is an action that occurs on your ACK-based device, after a user completes a pre-programmed pattern, such as pressing a unique button combination. You typically use these triggers to transition devices into a specific device state. For more details about designing your device to handle these triggers, see User-Initiated Triggers.| User-initiated trigger SDK variable | Description | Action |
|---|---|---|
ACKUser_DoesUserWantFactoryReset | Initiate a factory reset. | Application must return true to start the factory reset. |
ACKUser_DoesUserWantUserGuidedSetup | Initiate User-Guided Setup (UGS) mode. | Application must return true to start UGS. |
ACKUser_DoesUserWantToSubmitLogs | Initiate log upload. | Application must return true to start uploading the logs. |
ACKUser_EraseUserSettings | Erase user settings stored on the device (not a factory reset). | Application must to erase on-device user preferences (if any) and return to the factory defaults. |
ACKUser_IsDeviceInUse | Checks if the device is currently operating. For example, when a microwave is cooking. Use this mode to prevent potentially disruptive operations, such as sending an over-the-air (OTA) update. | Application should return true when the device is in-use. |
ACKUser_GetFirmwareVersion | Retrieve firmware version of a device. | Application must to return the current device firmware version as a 64-bit integer. Report the device firmware versions in ascending order. |

