I developed an application to display some text at defined intervals in the Android emulator screen. I am using the Handler class. Here is a snippet from my cod
Handler
In Kotlin, using coroutines you can do the following:
CoroutineScope(Dispatchers.Main).launch { // Main, because UI is changed ticker(delayMillis = 1000, initialDelayMillis = 1000).consumeEach { tv.append("Hello World") } }
Try it out here!