Kotlin Coroutines and Delay
setTimeout with a delay. The
setTimeout code never makes it to production, but it does help me to understand if my code is the problem or if there's a timing conflict.
In working with Kotlin on Android, I've needed to employ the same technique. Kotlin obviously doesn't have a
setTimeout, but it does have coroutines to achieve approximately the same effect.
To run an async coroutine with delay, you can use the following Kotlin code:
// Create an async coroutine
// Execute code to test functionality
The coroutine becomes async and the delay can be whatever amount of milliseconds you'd like!
For the longest time, developers were frustrated by elements with overflow not being scrollable within the page of iOS Safari. For my blog it was particularly frustrating because I display my demos in sandboxed IFRAMEs on top of the article itself, so as to not affect my site's...
It's no secret that Facebook has become a major traffic driver for all types of websites. Nowadays even large corporations steer consumers toward their Facebook pages instead of the corporate websites directly. And of course there are Facebook "Like" and "Recommend" widgets on every website. One...