🌍 Mobile App Development · subject

Mobile App Development Native Android Development Syllabus

The Native Android Development syllabus for Mobile App Development in full: 7 chapters and 25 topics, every one listed below, plus 60 Native Android Development flashcards with answers.

7Chapters
25Topics
60Flashcards

Native Android Development syllabus: all 7 chapters

Expand any chapter to see its topics and sub-topics.

  1. Android Studio and Project Setup

    4 topics
    • Android Studio and Gradle
    • Project Structure and Manifest
    • Emulators and Physical Devices
    • Resources and Configuration Qualifiers
  2. Jetpack Compose

    4 topics
    • Composable Functions and Modifiers
    • State and Recomposition
    • Navigation Compose
    • Theming and Material 3
  3. Android Views and UI

    3 topics
    • XML Layouts and View Binding
    • RecyclerView and Adapters
    • ConstraintLayout
  4. Android Architecture Components

    4 topics
    • ViewModel and LiveData
    • Lifecycle-Aware Components
    • WorkManager and Background Tasks
    • Navigation Component
  5. Concurrency and Networking

    3 topics
    • Kotlin Coroutines and Flow
    • Retrofit and OkHttp
    • JSON Serialization (Moshi/Gson)
  6. Data Persistence on Android

    3 topics
    • SharedPreferences and DataStore
    • Room Database
    • File Storage and Scoped Storage
  7. Android Platform Services

    4 topics
    • Firebase Cloud Messaging
    • Location and Maps
    • Permissions Model
    • Google Play Billing

Mobile App Development Native Android Development flashcards — 60 questions with answers

  1. In Android development, what is Gradle's role and what are the two main build files in a typical project?

    Gradle is the build automation system that compiles code, manages dependencies, and packages the APK/AAB. The two main files are the project-level build.gradle (defines plugins/repositories for all modules) and the module-level build.gradle (e.g., app/, defining SDK versions, dependencies, and build configuration).

  2. What is the difference between compileSdk, minSdk, and targetSdk in an Android module's build configuration?

    compileSdk is the API level used to compile the app (which APIs are available). minSdk is the lowest Android version the app can run on. targetSdk declares the API level the app was tested against, controlling runtime behavior/compatibility flags.

  3. What is the purpose of the AndroidManifest.xml file?

    It declares the app's essential information to the Android system: package identity, components (activities, services, broadcast receivers, content providers), required permissions, hardware/software features, and the app's entry point (launcher activity).

  4. In the manifest, how do you designate an Activity as the app's launcher (entry point)?

    By adding an intent-filter inside the activity with the action android.intent.action.MAIN and the category android.intent.category.LAUNCHER.

  5. Describe the standard Gradle-based Android project directory structure for source, resources, and manifest.

    Source code lives in src/main/java (or kotlin), resources in src/main/res, and the manifest at src/main/AndroidManifest.xml. Test code lives in src/test (unit tests, JVM) and src/androidTest (instrumented tests, on device).

  6. What is an APK versus an AAB (Android App Bundle)?

    An APK is the installable package delivered directly to a device. An AAB is the publishing format uploaded to Google Play; Play then generates optimized, device-specific APKs (split by density, ABI, language) from it, reducing download size.

  7. What is the difference between an Android emulator (AVD) and a physical device for testing?

    An emulator (Android Virtual Device) runs a virtualized Android system on the developer's machine, letting you test many API levels/screen sizes without hardware. A physical device gives real performance, sensors, and hardware behavior. Physical devices require USB debugging enabled via Developer Options.

  8. How do you enable USB debugging on a physical Android device?

    Enable Developer Options by tapping Build Number seven times in Settings > About phone, then enable USB Debugging within Developer Options. The device then becomes accessible to adb/Android Studio over USB.

  9. What is adb and name three commonly used adb commands.

    adb (Android Debug Bridge) is a command-line tool for communicating with devices/emulators. Common commands: adb devices (list connected devices), adb install <apk> (install an app), adb logcat (view device logs).

  10. In Android resources, what is the purpose of configuration qualifiers, and give three examples.

    Configuration qualifiers let you provide alternative resources for different device configurations, selected automatically at runtime. Examples: -en (language English), -land (landscape orientation), -xxhdpi (extra-extra-high density screens), -sw600dp (smallest width 600dp for tablets).

  11. How does Android choose which resource to use when multiple qualified directories exist (e.g., values, values-fr, values-fr-land)?

    Android eliminates directories that contradict the current device configuration, then picks the surviving directory that matches the highest-precedence qualifier. Qualifier precedence follows a fixed order (e.g., MCC, language, screen size, orientation, density); the best match wins, falling back to defaults.

  12. What is the density-independent pixel (dp) and how does it relate to physical pixels?

    A dp is a virtual unit that scales with screen density so UI elements have consistent physical size. The relationship is $px = dp \times \frac{dpi}{160}$, where 160 dpi (mdpi) is the baseline at which $1\,dp = 1\,px$.

  13. In Jetpack Compose, what is a Composable function and how is it marked?

    A Composable is a function that describes a piece of UI declaratively. It is marked with the @Composable annotation and can only be called from within other Composable functions. It emits UI rather than returning it.

  14. In Jetpack Compose, what are Modifiers and how are they typically applied?

    Modifiers are objects that decorate or configure a Composable, altering size, layout, padding, background, click behavior, etc. They are passed via a modifier parameter and chained, e.g., Modifier.padding(8.dp).background(Color.Red).clickable { }. Order matters because each modifier wraps the previous.

  15. In Compose, why does modifier order matter? Give an example.

    Modifiers are applied outside-in in chain order, so each affects what follows. For example Modifier.padding(16.dp).background(Color.Red) puts padding outside the red background (padding is uncolored), whereas Modifier.background(Color.Red).padding(16.dp) colors the whole area including the padded region.

  16. What is recomposition in Jetpack Compose?

    Recomposition is the process where Compose re-executes Composable functions whose inputs (state) have changed, updating only the affected parts of the UI. It can happen frequently, may run in any order, and can be skipped for unchanged parts, so Composables must be side-effect free.

  17. In Compose, what is the difference between remember and rememberSaveable?

    remember stores a value across recompositions but loses it on configuration changes (e.g., rotation) or process death. rememberSaveable additionally survives configuration changes and process recreation by saving to a Bundle, suitable for simple UI state.

  18. What does mutableStateOf do, and why must it be wrapped in remember?

    mutableStateOf creates an observable State holder; reads are tracked so writes trigger recomposition. It must be wrapped in remember (val x by remember { mutableStateOf(0) }) so the state survives recomposition rather than being reset each time the Composable runs.

  19. Explain state hoisting in Jetpack Compose.

    State hoisting is the pattern of moving state up to a Composable's caller, making the Composable stateless. The Composable receives the value plus an event callback (e.g., value and onValueChange). This improves reusability, testability, and creates a single source of truth.

  20. In Navigation Compose, what are the three core pieces needed to set up navigation?

    A NavController (created with rememberNavController()), a NavHost that maps routes to Composable destinations, and route strings for each destination. Navigation is triggered with navController.navigate("route").

Show the other 40 Native Android Development flashcards
  1. In Navigation Compose, how do you pass arguments between destinations via the route?

    Define the route with a placeholder like "profile/{userId}" and declare arguments in the composable's arguments list with navArgument. Navigate with the concrete value (e.g., navigate("profile/42")) and read it from backStackEntry.arguments in the destination.

  2. What is Material 3 (Material You) and how does it differ from Material 2 in Compose theming?

    Material 3 is the latest Material Design system supporting dynamic color and an updated color/typography system. Compared to Material 2, it uses a larger set of color roles (primary, onPrimary, primaryContainer, surface, etc.), new components, and supports Android 12+ dynamic color derived from the user's wallpaper.

  3. What are the three main pillars of a Compose MaterialTheme?

    colorScheme (the app's color roles), typography (text styles like displayLarge, bodyMedium), and shapes (corner styles for components). Composables read these via MaterialTheme.colorScheme, MaterialTheme.typography, and MaterialTheme.shapes.

  4. What is View Binding and what problem does it solve compared to findViewById?

    View Binding generates a binding class per XML layout with direct, typed references to all views with IDs. It eliminates findViewById boilerplate, provides null safety and type safety, and prevents crashes from invalid IDs or type mismatches since references are checked at compile time.

  5. How is View Binding enabled and used to inflate a layout in an Activity?

    Enable it in the module build.gradle with buildFeatures { viewBinding true }. In the Activity, call val binding = ActivityMainBinding.inflate(layoutInflater), then setContentView(binding.root), and access views via binding.viewId.

  6. What is the difference between View Binding and Data Binding?

    View Binding only generates typed references to views (lightweight, no expressions in XML). Data Binding is a broader superset that also allows binding expressions directly in XML layouts (via <layout> tags), two-way binding, and observable data, at the cost of more build overhead.

  7. What is a RecyclerView and why is it preferred over ListView?

    RecyclerView is a flexible, efficient view for displaying large, scrollable data sets. It recycles (reuses) off-screen item views via the ViewHolder pattern, uses pluggable LayoutManagers, and supports animations and DiffUtil—giving better performance and flexibility than the older ListView.

  8. What is the ViewHolder pattern in a RecyclerView Adapter?

    A ViewHolder caches references to the item layout's views so they need not be looked up repeatedly during scrolling. The Adapter creates ViewHolders in onCreateViewHolder and binds data to their cached views in onBindViewHolder, enabling smooth recycling.

  9. Name the three RecyclerView.Adapter methods you must override and what each does.

    onCreateViewHolder (inflates an item layout and returns a ViewHolder), onBindViewHolder (binds data at a given position to the ViewHolder's views), and getItemCount (returns the total number of items in the data set).

  10. What is DiffUtil and how does it improve RecyclerView performance?

    DiffUtil calculates the minimal set of changes between two lists (using a difference algorithm) and dispatches fine-grained update notifications (insert/remove/move/change) instead of notifyDataSetChanged(). This enables efficient updates and automatic item animations. ListAdapter wraps DiffUtil for convenience.

  11. What LayoutManager would you use for a grid in RecyclerView, and how does it differ from a vertical list?

    Use GridLayoutManager (with a span count) for a grid; use LinearLayoutManager for a simple vertical or horizontal list. StaggeredGridLayoutManager creates a grid with items of varying sizes/offsets.

  12. What is ConstraintLayout and what is its main advantage?

    ConstraintLayout is a flexible layout that positions views using constraints (relationships) to sibling views and the parent. Its main advantage is building complex, flat (non-nested) view hierarchies, which improves layout performance and adapts responsively to different screen sizes.

  13. In ConstraintLayout, what is a bias and what value centers a view?

    Bias sets a view's position along a constrained axis as a fraction between its two opposing constraints. It ranges from 0.0 to 1.0; a horizontal_bias or vertical_bias of $0.5$ centers the view between its constraints.

  14. In ConstraintLayout, what are Guidelines, Barriers, and Chains used for?

    Guidelines are invisible reference lines (by dp or percent) to align views. Barriers move based on the extent of a set of referenced views. Chains link views bidirectionally so they share space via a chain style (spread, spread_inside, packed) or weights.

  15. What is a ViewModel in Android Architecture Components and why does it exist?

    A ViewModel holds and manages UI-related data in a lifecycle-conscious way, surviving configuration changes like rotation. It separates UI logic/state from the UI controller (Activity/Fragment), preventing data loss and avoiding heavy work in the view layer.

  16. How does a ViewModel survive a configuration change but not stay forever?

    A ViewModel is scoped to a lifecycle owner and retained across configuration changes (the Activity is recreated but the ViewModel instance persists). It is cleared—its onCleared() is called—only when the owner is permanently destroyed (e.g., Activity finished, not just rotated).

  17. 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.

  18. 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).

  19. 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.

  20. 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.

  21. 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.

  22. 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.

  23. 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}$).

  24. 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).

  25. 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).

  26. 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.

  27. 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().

  28. 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.

  29. 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.

  30. 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.

  31. 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.

  32. 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.

  33. 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.

  34. 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).

  35. 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.

  36. 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.

  37. 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.

  38. 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.

  39. 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.

  40. 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.

Mobile App Development Native Android Development FAQ

What is in the Mobile App Development Native Android Development syllabus?

Mobile App Development Native Android Development is split into 7 chapters: Android Studio and Project Setup, Jetpack Compose, Android Views and UI, Android Architecture Components, Concurrency and Networking, Data Persistence on Android and Android Platform Services. Together they contain 25 topics.

How many chapters are in Mobile App Development Native Android Development?

7 chapters, containing 25 topics. The largest chapter is Android Studio and Project Setup, with 4 topics.

Are there flashcards for Mobile App Development Native Android Development?

Yes — a 60-card Native Android Development deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.