SPINNER
START_SPINNER - Start an indeterminate spinner for a long-running task
STOP_SPINNER - Stop a running spinner and close the dialog
When to use them
START_SPINNER shows an indeterminate progress spinner indicating a
long-running task is underway.
STOP_SPINNER cancels a spinner when the task is complete.
START_SPINNER
Syntax
START_SPINNER [message]
message required
Message to display while the spinner is active. Messages should be kept short enough to fit on the device display.
In firmware 1.0.4 or older, the spinner message must be a single word. Using a multi-word message will create a dialog which can not be cancelled.
This is fixed in firmware 1.0.5 and newer - on current firmware releases, use any spinner message you like!
Results
START_SPINNER returns an ID of the spinner as output. You must capture this value to cancel the spinner!
STOP_SPINNER
Syntax
STOP_SPINNER {spinner_id}
spinner_id
Examples
__spinnerid=$(START_SPINNER "Thinking")
sleep 5
STOP_SPINNER ${__spinnerid}