← All Android Development Flashcard Decks

Android Background Processing Flashcards

6 cards from real Android Development practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 Android Background Processing flashcards as text
  1. Which Jetpack library is the recommended solution for deferrable background work in Android?

    Answer: WorkManager

    WorkManager is the recommended Jetpack library for deferrable, guaranteed background work that is constraint-aware and battery-friendly.

  2. What is a coroutine in Kotlin?

    Answer: A lightweight concurrency primitive that can suspend and resume execution

    Kotlin coroutines are lightweight concurrency primitives that allow you to write asynchronous, non-blocking code in a sequential style.

  3. Which coroutine dispatcher should be used for CPU-intensive tasks in Android?

    Answer: Dispatchers.Default

    Dispatchers.Default uses a shared thread pool optimized for CPU-intensive computation tasks like sorting and parsing.

  4. Which WorkManager class represents a single unit of background work?

    Answer: Worker

    Worker is the class you extend to implement the background task logic in WorkManager, overriding the doWork() method.

  5. What is the purpose of Dispatchers.IO in Kotlin coroutines?

    Answer: For network and disk I/O operations

    Dispatchers.IO uses a larger thread pool optimized for blocking I/O operations like file reads, network calls, and database queries.

  6. What type of Android Service runs in a foreground process and shows a persistent notification?

    Answer: Foreground Service

    A Foreground Service performs long-running operations visible to the user through a required persistent notification, giving it higher process priority.