Coroutines sind Kotlins Lösung für asynchrone Programmierung — das Schreiben von asynchronem Code (Netzwerkaufrufe, Datenbankoperationen), der sequenziell gelesen werden kann, ohne den Main-Thread zu blockieren. Sie sind die moderne, empfohlene Methode, um asynchrone Arbeit in Android zu handhaben und vermeiden Callback-Komplexität.
Warum es wichtig ist
The MAIN (UI) thread must stay responsive — blocking it (with network/DB work) freezes
the UI (ANR "Application Not Responding" errors):
→ long operations MUST run off the main thread (asynchronously)
→ old approaches: callbacks (nested, complex), threads/AsyncTask (verbose, error-prone)
→ COROUTINES make async code clean and sequential.
