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 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 2Choose 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 3Choose 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 4Choose 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 5Choose 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 6Choose 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 7Choose 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 8Choose 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?

Question 9Choose one

**Company Background:** `FieldAgentPro` is an enterprise application used by technicians for on-site job management. A core requirement is robust offline capability, as technicians often work in areas with poor or no internet connectivity. All job data, including customer details, work orders, and inventory parts, must be available offline. **Current Situation:** The development team is designing the data layer for the app. They have decided to use Room for local persistence and Retrofit for network communication with the backend API. The architecture must follow the 'single source of truth' principle, where the UI only observes data from the local Room database. **Requirements:** 1. The app must fetch data from the network and store it in the Room database when online. 2. When offline, the app must seamlessly serve data from the Room database. 3. The UI should be updated automatically whenever the local data changes (either from a network sync or local modification). 4. The data layer must abstract the origin of the data (network vs. local) from the ViewModel and UI. 5. The design should be efficient, avoiding unnecessary network calls if the local data is fresh. Which of the following data layer designs best satisfies all requirements for this offline-first application? erDiagram VIEW_MODEL ||--|{ REPOSITORY : uses REPOSITORY ||--|{ API_SERVICE : fetches_from REPOSITORY ||--|{ ROOM_DAO : accesses API_SERVICE { string type "(Retrofit)" } ROOM_DAO { string type "(Room)" }

Question 10Choose one

To handle a deep link URI such as `https://example.com/products/123`, which element must be correctly configured inside the ` ` tag in the `AndroidManifest.xml` when using the Navigation Component?

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