🌍 Mobile App Development · flashcards

Mobile App Development Native Android Development Flashcards

60 question-and-answer cards covering Native Android Development as it is examined in Mobile App Development. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.

60Cards in deck
24Free preview
25Syllabus topics
~256Chars per answer
FreePrice

24 sample cards from the Native Android Development deck

Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.

  1. What is LiveData and what is its key characteristic?

    LiveData is an observable, lifecycle-aware data holder. Its key characteristic is that it only delivers updates to observers in an active lifecycle state (STARTED or RESUMED) and automatically removes observers when their lifecycle is destroyed, preventing memory leaks and crashes from updating stopped UI.

  2. What is the difference between LiveData and MutableLiveData?

    MutableLiveData exposes setValue()/postValue() to change the data and is typically kept private inside a ViewModel. LiveData is the read-only supertype exposed publicly to observers, enforcing that only the owner can modify the value (encapsulation).

  3. What is the difference between setValue() and postValue() on MutableLiveData?

    setValue() updates the value synchronously and must be called from the main thread. postValue() schedules the update to be posted to the main thread and can be called from a background thread.

  4. What is a lifecycle-aware component and what interface enables it?

    A lifecycle-aware component adjusts its behavior based on the lifecycle state of an Activity or Fragment. It implements LifecycleObserver (or DefaultLifecycleObserver) and observes a Lifecycle owner, so it can start/stop work automatically at the right lifecycle events, reducing leaks and boilerplate.

  5. List the main Android Activity lifecycle callbacks in the order they occur when an Activity starts and becomes visible.

    onCreate() -> onStart() -> onResume(). When leaving the foreground the reverse-ish order is onPause() -> onStop() -> onDestroy(). onRestart() runs before onStart() when returning from a stopped state.

  6. What is WorkManager and when should you use it?

    WorkManager is the recommended Jetpack API for persistent, deferrable background work that must run reliably even if the app exits or the device restarts—e.g., syncing data, uploading logs, periodic backups. It respects system constraints (battery, network) and is guaranteed to execute.

  7. What is the difference between OneTimeWorkRequest and PeriodicWorkRequest, and what is the minimum period for periodic work?

    OneTimeWorkRequest runs a task once. PeriodicWorkRequest repeats work on an interval. The minimum repeat interval for periodic work is 15 minutes ($15\,\text{min}$).

  8. How do you add Constraints to WorkManager work, and give two examples of constraints?

    Build a Constraints object and set it on the WorkRequest via setConstraints(). Examples: setRequiredNetworkType(NetworkType.CONNECTED) (only run with network) and setRequiresCharging(true) (only run while charging).

  9. What is the Jetpack Navigation Component (View-based) and what are its three main parts?

    The Navigation Component is a framework for in-app navigation between destinations. Its three main parts are the navigation graph (an XML resource defining destinations and actions), the NavHost (a container displaying destinations, e.g., NavHostFragment), and the NavController (the object that manages navigation within the NavHost).

  10. What is Safe Args in the Navigation Component?

    Safe Args is a Gradle plugin that generates type-safe classes and builders for navigating and passing arguments between destinations. It replaces error-prone Bundle key/value passing with compile-time-checked Directions and Args classes.

  11. In Kotlin coroutines, what is the difference between launch and async?

    launch starts a coroutine that does not return a result and returns a Job (fire-and-forget). async starts a coroutine that computes a result and returns a Deferred<T>, whose value is retrieved by calling .await().

  12. What is a suspend function in Kotlin and what is special about it?

    A suspend function is a function that can pause (suspend) its execution without blocking the underlying thread, and resume later. It can only be called from another suspend function or a coroutine, and is the building block for asynchronous, non-blocking code.

  13. In Kotlin coroutines, what are Dispatchers.Main, Dispatchers.IO, and Dispatchers.Default used for?

    Dispatchers.Main runs on the UI thread (for UI updates). Dispatchers.IO is optimized for blocking I/O like network/disk operations. Dispatchers.Default is for CPU-intensive work such as sorting or parsing large data.

  14. What is structured concurrency in Kotlin coroutines and what is a CoroutineScope?

    Structured concurrency means coroutines are launched within a scope that tracks them, so they have a defined lifetime and are automatically cancelled together (e.g., when the scope is cancelled). A CoroutineScope defines this scope; examples include viewModelScope and lifecycleScope which cancel with their owner.

  15. In Kotlin, what is a Flow and how does it differ from a suspend function returning a single value?

    A Flow is a cold asynchronous stream that can emit multiple values sequentially over time, whereas a suspend function returns a single value. Flow is cold—the producer code runs only when a terminal operator like collect() is called.

  16. What is the difference between StateFlow and SharedFlow?

    StateFlow is a hot, state-holder flow that always has a current value and emits the latest value to new collectors (like an observable value; conflated). SharedFlow is a more general hot flow for events, without a required initial value, with configurable replay and buffering—suited to one-time events.

  17. What is Retrofit and what does it do?

    Retrofit is a type-safe HTTP client for Android/Java that turns a REST API into a Kotlin/Java interface. You declare endpoints with annotations (@GET, @POST, etc.), and Retrofit generates the implementation that performs the HTTP calls and converts responses using a converter.

  18. In Retrofit, what do the annotations @Path, @Query, and @Body do?

    @Path replaces a placeholder segment in the URL (e.g., users/{id}). @Query appends a URL query parameter (e.g., ?page=2). @Body sends an object as the HTTP request body, serialized by the configured converter (e.g., for POST/PUT).

  19. What is OkHttp and how does it relate to Retrofit?

    OkHttp is the underlying HTTP client library that actually executes network requests, managing connection pooling, caching, and interceptors. Retrofit is built on top of OkHttp; Retrofit handles the API-interface abstraction while OkHttp handles the low-level networking.

  20. What is an OkHttp Interceptor and give a common use case?

    An Interceptor is a component that can observe, modify, retry, or short-circuit HTTP requests and responses in a chain. A common use case is adding an authorization header to every request, or a logging interceptor (HttpLoggingInterceptor) to log request/response bodies for debugging.

  21. What is JSON serialization/deserialization and why is a converter needed in Retrofit?

    Serialization converts objects to JSON; deserialization parses JSON into objects. Retrofit itself only handles HTTP, so a converter factory (e.g., Moshi or Gson) is added to translate between the JSON payload and your data/model classes automatically.

  22. Compare Moshi and Gson as JSON libraries for Android.

    Both map JSON to objects. Moshi is modern, Kotlin-friendly (handles non-null and default values well), faster, and supports codegen with an annotation processor (avoiding reflection). Gson is older, reflection-based, and less aware of Kotlin nullability, which can allow null into non-null fields.

  23. In Moshi/Gson, how do you map a JSON field whose name differs from your Kotlin property name?

    Use a field-naming annotation: @Json(name = "json_field") in Moshi, or @SerializedName("json_field") in Gson, placed on the property so the library maps the differing JSON key to your property.

  24. In Retrofit with coroutines, how do you declare a suspend API function and handle the response?

    Declare the interface function as suspend with a return type of the deserialized model or Response<T>, e.g., suspend fun getUser(@Path("id") id: Int): User. Retrofit runs the call off the main thread; you call it from a coroutine (e.g., viewModelScope) and wrap it in try/catch to handle IO/HTTP exceptions.

What this deck covers

The Native Android Development deck follows the Mobile App Development Native Android Development syllabus — 7 chapters and 25 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 8.6 cards per chapter.

Answers are written to be recallable, not just readable — averaging about 256 characters, which is long enough to carry the reasoning and short enough to say out loud.

A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.

Native Android Development flashcards FAQ

How many Native Android Development flashcards are in this Mobile App Development deck?

60 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.

Are these Mobile App Development flashcards free?

Yes. The preview here is free to read with no signup, and the full 60-card deck is free inside the Examius app.

What do the Native Android Development cards cover?

They follow the Mobile App Development Native Android Development syllabus — 7 chapters and 25 topics — so the questions track what is actually examinable.

How should I use these flashcards?

Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.