Package kotlinx.coroutines.android

Provides Dispatchers.Main context for Android applications.

Types

Link copied to clipboard
sealed class HandlerDispatcher : MainCoroutineDispatcher, Delay

Dispatches execution onto Android Handler.

Functions

Link copied to clipboard
@JvmName(name = "from")
fun Handler.asCoroutineDispatcher(name: String? = null): HandlerDispatcher

Represents an arbitrary Handler as an implementation of CoroutineDispatcher with an optional name for nicer debugging

Link copied to clipboard
suspend fun awaitFrame(): Long

Awaits the next animation frame and returns frame time in nanoseconds.