This method tries to perform the action with both internet and Bluetooth communication methods,
possibly in parallel.
The callback provides global success/error status, plus detailed status information for each
method. In particular, the sequence of callbacks is guaranteed to be:
For global status: exactly one of onSuccess or onError.
For internet status: zero or more onInternetStatus, then exactly one of onInternetSuccess or onInternetError.
For Bluetooth status: zero or more onBluetoothStatus or onBluetoothStatusProgress, then exactly one of onBluetoothSuccess or onBluetoothError.
For Bluetooth, the SDK does some high-priority syncing before the action and some low-priority syncing after, so after the global onSuccess or onError is called you may still receive Bluetooth status updates. In this case, we recommend you show the success/failure to the user immediately to not make them wait, but still show a Bluetooth icon with a spinning indicator to convey there's still Bluetooth activity.
Parameters
sessionID: string
ID for the session to use.
gadgetID: string
Gadget ID, in the format "gad_3vms1xqucnus4ppfnl9h".
Do an action on a gadget.
This method tries to perform the action with both internet and Bluetooth communication methods, possibly in parallel.
The callback provides global success/error status, plus detailed status information for each method. In particular, the sequence of callbacks is guaranteed to be:
onSuccess
oronError
.onInternetStatus
, then exactly one ofonInternetSuccess
oronInternetError
.onBluetoothStatus
oronBluetoothStatusProgress
, then exactly one ofonBluetoothSuccess
oronBluetoothError
.For Bluetooth, the SDK does some high-priority syncing before the action and some low-priority syncing after, so after the global
onSuccess
oronError
is called you may still receive Bluetooth status updates. In this case, we recommend you show the success/failure to the user immediately to not make them wait, but still show a Bluetooth icon with a spinning indicator to convey there's still Bluetooth activity.