July 2018
Intermediate to advanced
242 pages
8h 6m
English
You may have noticed our predefined functions are marked with the suspend modifier declared before the fun keyword, for example, suspend fun `show progress animation`(). The reason behind this is that we need to declare explicitly that the function is going to run inside the coroutine scope to be able to use coroutine-specific features inside the function's body. In our case, we are using the delay() function, which can be invoked only inside a coroutine scope. It is responsible for pausing the coroutine for a given amount of time without blocking the current thread.
Read now
Unlock full access