โ† All Android Development Flashcard Decks

Android Development Flashcards

7 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 7 Android Development flashcards as text
  1. A user reports that your app's UI freezes for two seconds when opening a screen that parses a large JSON file. What is the best remedy?

    Answer: Parse the JSON in a coroutine on a background dispatcher and post results to the UI

    Heavy parsing must be moved off the main thread; coroutines with Dispatchers.Default or IO keep the UI responsive.

  2. What is the difference between 'minSdkVersion' and 'targetSdkVersion' in Gradle?

    Answer: minSdk is the lowest OS version supported; targetSdk declares which version's behavior changes the app is tested against

    minSdkVersion gates installation on old devices, while targetSdkVersion opts the app into newer platform behaviors.

  3. Which scenario correctly describes a memory leak in an Android app?

    Answer: A static field holds a reference to a destroyed Activity, preventing garbage collection

    Long-lived references, such as statics or singletons holding an Activity, keep destroyed components in memory.

  4. What is the purpose of a Foreground Service on modern Android versions?

    Answer: Running user-visible ongoing work, like music playback, with a persistent notification

    Foreground services perform noticeable ongoing work and must display a notification so the user knows they are running.

  5. In Jetpack Compose, what does the 'remember' function do?

    Answer: Caches a value across recompositions of the same composable

    remember keeps a value in the composition so it is not recalculated on every recomposition, though it is lost on configuration change unless rememberSaveable is used.

  6. Which Gradle build feature lets you produce free and paid versions of an app from one codebase?

    Answer: Product flavors

    Product flavors define app variants, such as free and paid, that can differ in code, resources, and application ID.

  7. What does the LiveData class guarantee that a plain observable does not?

    Answer: Lifecycle-aware delivery, so observers only receive updates while active

    LiveData respects the observer's lifecycle, delivering data only to started or resumed components and auto-removing destroyed ones.