Showing a spinner in a device handler

I want to try and write some retry logic around something, might take a second or two, how do you show a spinner? I know it’s possible in the app because I’ve seen it in other parts of the app, is there a built in spinner you can initialize, run a long running command, then hide the spinner or loading icon?

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.