ExamDumpster

Free AAD sample questions

Real questions from the Associate Android Developer practice bank, with the correct answer and an explanation for each one. No junk, no filler.

Try them in the simulator Same questions, with study, timed and flashcard modes.

Showing 10 of 20 free sample questions.

Question 1Choose one

A junior developer is building a Jetpack Compose screen that displays a list of user profiles. They've noticed that whenever a single profile's 'like' status changes, the entire list recomposes, causing performance issues. The senior developer suggests using 'state hoisting'. What is the primary goal of state hoisting in this context?

Question 2Choose one

An application uses a Room database with a DAO that returns a `Flow >` to observe data changes. The UI layer collects this flow, but under heavy database write loads, the UI freezes because it's receiving updates too frequently. Which Flow operator is the most appropriate solution to apply before collecting the flow in the UI layer to mitigate this issue without losing the final state?

Question 3Choose 2

A developer needs to schedule a background task using WorkManager that should only run when the device has a certain level of battery and is connected to a Wi-Fi network. Which of the following constraints should be applied to the `WorkRequest`? (Select TWO)

Question 4Choose one

When writing a unit test for a `ViewModel` that uses `viewModelScope` to launch coroutines, what is the modern, recommended approach to manage the `Dispatchers.Main` dispatcher and control coroutine execution within a JUnit test?

Question 5Choose one

To clear all data for a specific application package during development, a developer can use the Android Debug Bridge (adb). The command to achieve this is: `adb shell pm clear ______`.

Question 6Choose one

**Company Background:** `FitLife` is a fitness tracking company modernizing its Android application. The current app was built five years ago using XML layouts and the traditional View system. The UI is inconsistent, slow to render complex screens, and difficult to maintain due to deeply nested `LinearLayouts` and `RelativeLayouts` inside a `ScrollView`. **Current Situation:** The main dashboard screen is particularly problematic. It displays user stats, a list of recent workouts, and daily challenges. All this data comes from a `DashboardViewModel` which exposes several `LiveData` objects. The XML for this screen is over 800 lines long. **Requirements:** The CTO has mandated a full migration of the dashboard screen to Jetpack Compose to improve performance and maintainability. The new implementation must: 1. Be built entirely with declarative UI components. 2. Observe the existing `LiveData` objects from the `DashboardViewModel` in a lifecycle-aware manner. 3. Replace the `RecyclerView` for recent workouts with a lazy-loading list in Compose. 4. Ensure the new UI is themable and supports Material 3 design principles. Which of the following approaches is the most effective and idiomatic way to implement the new Jetpack Compose dashboard screen based on the requirements? flowchart TD subgraph ViewModel A[LiveData ] B[LiveData >] C[LiveData ] end subgraph Compose UI D{DashboardScreen} E[StatsCard] F[WorkoutList] G[ChallengeBanner] end ViewModel --> D D --> E D --> F D --> G

Question 7Choose one

True or False: Jetpack DataStore is a direct, drop-in replacement for SharedPreferences and uses the same synchronous, file-based I/O API on the main thread.

Question 8Choose one

On Android 14 (API 34), an app that needs to perform a long-running task like a data sync must declare a foreground service. What is the critical requirement that the app must fulfill when calling `startForeground()` for a service related to data synchronization?

Question 9Choose one

In an Espresso UI test, the app performs a network request that takes an unpredictable amount of time to complete before updating a `TextView`. The test intermittently fails with an `NoMatchingViewException` because the assertion runs before the `TextView` is updated. What is the most robust and recommended way to make Espresso wait for this asynchronous operation to complete?

Question 10Choose one

In Jetpack Compose, a developer needs to display a potentially very long, vertically scrolling list of items. To ensure good performance, only the items visible on screen should be composed and rendered. Which composable should be used?

10 more free samples are waiting

Create a free account to unlock the whole AAD sample bank, or get full access to all 181 practice questions in the simulator.

Create account