Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Android Application Development v8 AND-801 Exam Questions

Last updated: · 15 practice questions with answers and explanations

Page: 1 / 8 Total 45 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Lesson 1: Introduction to Kotlin

Skill tested: Select Kotlin type inference and mutability features for safely storing changing data.

A mobile team is writing a Kotlin utility that reads a user's planned delivery count, then updates that count after each successful order. The initial value comes from a function that returns an integer. The variable must be reassigned during execution, but the team wants Kotlin to infer its type without an explicit declaration. Which declaration best meets both requirements?

Correct Answer: D. var deliveries = readCount()
Explanation:

A `var` permits reassignment, and Kotlin infers its type from the initializer, which returns an integer. The inferred type is therefore `Int`. A `val` cannot be reassigned, so A and D fail the update requirement. C explicitly declares `String`, which conflicts with the integer-returning initializer and would not compile without conversion.

Question 2

New Single answer

Topic: Lesson 2: Control Flow Statements

Skill tested: Use Kotlin when branches and ranges to classify values with mutually exclusive outcomes.

An order-processing utility assigns a shipping band from an integer number of package items. The business rules are: zero or fewer items is invalid; 1 through 5 items use the compact band; 6 through 20 use the standard band; all larger counts use the bulk band. The result should be produced as a single expression, and each valid count must match exactly one branch. Which Kotlin expression is the best fit?

Correct Answer: A. A `when` expression with `count
Explanation:

Kotlin's `when` can be used as an expression, and range membership makes the boundaries explicit and mutually exclusive. The first condition rejects nonpositive values; the ranges then cover 1-5 and 6-20, with `else` covering larger values. C mishandles the boundary at 5 and does not distinguish the intended bands. B and D use iteration where direct branching is clearer and risk unnecessary or incorrect repeated assignments.

Question 3

New Single answer

Topic: Lesson 3: Functions & Object-Oriented Programming (OOP)

Skill tested: Choose a mutable collection type for an ordered list that the application must update.

A Kotlin-based Android screen receives an ordered set of recently viewed product identifiers. It must preserve insertion order, allow duplicate identifiers, and support adding and removing entries while the screen is active. The team does not need key-based lookup, and it wants a standard Kotlin collection created directly in application code. Which choice best satisfies these requirements?

Correct Answer: D. Create a `mutableListOf()` and add or remove identifiers through the mutable-list reference.
Explanation:

`mutableListOf()` supplies a mutable list that retains list ordering and allows duplicates, so it fits the changing history. A `val` reference to a read-only `List` cannot be used to add or remove items through that interface. A map is organized around keys rather than an ordered sequence of potentially repeated entries, and a set removes duplicates. The team does not need map-style lookup.

Question 4

New Multiple answers

Topic: Lesson 4: Android Framework and Android Studio

Skill tested: Identify core Android application components and their roles in app structure.

A field-service application must expose a user-facing screen, run a component that can perform work without a visible screen, and respond to a system or app message through a registered component. The team is reviewing the Android application component model before splitting responsibilities across classes. Select the three component types that correspond to these roles. Select THREE answers.

Correct Answer: A. Service; B. Activity; D. Broadcast receiver
Explanation:

An Activity provides a user-interaction screen, a Service is an application component for work that is not directly represented by a UI, and a Broadcast receiver responds to broadcast intents. These are three of Android's application component types. A Gradle build script configures the build rather than serving as a runtime component. An Android Virtual Device is an emulator configuration used for testing, not part of the app's component model.

Question 5

New Single answer

Topic: Lesson 5: Creating User Interface UI

Skill tested: Configure radio-button controls so users can select only one option in a group.

A pizza-order screen offers three mutually exclusive crust choices. In testing, users can select more than one crust at the same time. The layout currently contains three independent radio buttons, and the team wants to preserve the existing choices while enforcing one selection within the crust section. Which change should the developer make?

Correct Answer: B. Place the radio buttons inside a `RadioGroup`.
Explanation:

A `RadioGroup` coordinates its contained radio buttons so only one can be checked at a time, matching mutually exclusive crust selection. Check boxes represent independently selectable values and would require custom coordination. Giving each radio button its own group would not enforce exclusivity across the choices. Identical labels have no effect on selection behavior.

Question 6

New Single answer

Topic: Lesson 6: Android Layouts, Styles, Theme and Menus

Skill tested: Choose a scrolling layout arrangement that supports content extending beyond the viewport.

A settings screen contains a vertically stacked form whose height varies with optional sections. On smaller devices, the final controls fall below the screen and users cannot reach them. The screen contains no independently scrolling child, and the team wants to keep the existing vertical arrangement while allowing the entire form to scroll. Which layout change is most appropriate?

Correct Answer: D. Wrap the vertical content in a `ScrollView`, with one direct child containing the form.
Explanation:

A `ScrollView` provides vertical scrolling for content taller than the viewport and supports a single direct child, which can be the existing vertical container. This preserves the form structure while making lower controls reachable. `FrameLayout` does not provide scrolling, and overlapping controls would harm usability. Multiple nested scroll views are unnecessary and can create confusing gesture behavior. `TableRow` arranges table cells; it does not scroll.

Question 7

New Multiple answers

Topic: Lesson 7: Toasts, Activities, Navigations, and Views

Skill tested: Pass navigation data between activities using an intent and its extras.

A restaurant app displays a list of locations and opens a detail screen when the user taps a row. The detail screen needs the selected location's stable identifier so it can load current information; passing the entire screen's view objects is not appropriate. The navigation is from one Activity to another in the same application. Which two actions correctly implement this transfer? Select TWO answers.

Correct Answer: B. Create an explicit `Intent` targeting the detail Activity and attach the identifier as an extra.; C. Read the identifier from the receiving Activity's intent extras.
Explanation:

An explicit Intent is the standard mechanism for starting a known Activity, and extras carry small pieces of data such as a selected record identifier. The receiving Activity reads that value from its incoming Intent. A Toast is transient presentation, not a data channel. A fixed XML value cannot represent the user's dynamic selection. A broadcast adds unnecessary indirection and is not required for direct Activity navigation.

Question 8

New Multiple answers

Topic: Lesson 8: Android Dailogs, Snackbar, Menus WebView and Notifications

Skill tested: Configure notification channels and post notifications through Android notification APIs.

A delivery app targets Android 8.0 or later and must notify users when a package status changes, including when the app is not visible. Notifications should appear in a user-manageable category, and the app must not depend on a screen being open to create that category. Which two implementation steps are required for the described notification flow? Select TWO answers.

Correct Answer: B. Build the notification with the channel ID and post it through `NotificationManager`.; D. Create a `NotificationChannel` and register it with `NotificationManager` on Android 8.0 and later.
Explanation:

Android 8.0 (API 26) and later require notifications to be associated with a channel. The app creates the channel and registers it with `NotificationManager`; it then builds notifications using that channel ID and posts them through the manager. The user can manage channel behavior in system settings. Toasts are temporary in-app feedback, not persistent notifications. A manifest declaration alone does not create the channel, and a menu item is not a background notification mechanism.

Question 9

New Single answer

Topic: Lesson 9: Android Storage, SQLite and Content Providers

Skill tested: Select internal storage for private app data that does not require shared access.

A medical-visit app stores a small local draft containing information that should be available only to the app and should not appear as a user-managed shared document. The draft must remain available across normal app launches, but the app does not need to expose it to other apps or users through external storage. Which storage option best fits this requirement?

Correct Answer: B. Write the draft to app-specific internal storage.
Explanation:

App-specific internal storage is appropriate for private files that must persist across launches without being shared as user documents. Other applications cannot ordinarily access those files directly, and the files are removed when the app is uninstalled. Public external storage is intended for data that may be visible or shared and therefore does not fit the privacy constraint. A provider owned by another app is not the app's private storage. Activity fields are not durable storage.

Question 10

New Multiple answers

Topic: Lesson 10: Location-Aware Apps: Using GPS and Google Maps

Skill tested: Handle runtime location permission and location availability before showing a user's position.

A restaurant-finder app uses the user's current position to sort nearby results. The app declares location access in its manifest, but some users deny the permission or have location services unavailable. The team must avoid attempting to use protected location data without authorization and must keep the search screen usable when a position cannot be obtained. Which two actions are appropriate? Select TWO answers.

Correct Answer: A. Check whether a usable location is available and provide a non-location fallback when it is not.; C. Request the required location permission at runtime and proceed with location-dependent work only after it is granted.
Explanation:

A manifest declaration alone does not grant runtime permission on Android versions that require it. The app should request the appropriate permission and access location only when authorized. Location may still be unavailable even after permission is granted, so the screen should handle that state and offer a useful fallback, such as manual location entry. Background access is not warranted for a foreground-only search. Permanently disabling the app after denial is unnecessarily restrictive.

Question 11

New Single answer

Topic: Lesson 4: Android Framework and Android Studio

Skill tested: Diagnose Android process priority and understand that background processes may be reclaimed.

A transit app stores the user's unfinished route only in a field on its Activity. After the user switches to another application and later returns, the Activity has been recreated and the route is missing. The team had assumed that the process would remain alive while backgrounded. What is the most appropriate corrective design?

Correct Answer: B. Persist the route's necessary state and restore it when the Activity is recreated, rather than relying on the process remaining alive.
Explanation:

Android can reclaim background processes when system resources are needed; applications should not assume that an Activity's in-memory fields survive. State needed after recreation should be saved and restored using suitable lifecycle-aware state handling or persistence, depending on its durability requirements. A BroadcastReceiver does not guarantee indefinite process lifetime. Apps cannot make a process immune to reclamation through a manifest priority setting. A Toast is only transient UI feedback.

Question 12

New Single answer

Topic: Lesson 7: Toasts, Activities, Navigations, and Views

Skill tested: Use RecyclerView adapter binding to efficiently present changing rows of data.

A catalog screen renders thousands of product records in a scrolling list. The current implementation creates a new row view every time a row becomes visible, causing sluggish scrolling and unnecessary allocations. The team wants to retain the existing RecyclerView and data model, while using its intended row-reuse mechanism. Which change is most appropriate?

Correct Answer: B. Create and inflate row holders as needed in `onCreateViewHolder`, then bind data in `onBindViewHolder` and reuse holders.
Explanation:

RecyclerView is designed to reuse item views through ViewHolders. `onCreateViewHolder` creates a holder when needed, while `onBindViewHolder` supplies the current item's data to an existing holder as it is reused. Creating views for every bind defeats that reuse and increases allocations. A `ScrollView` containing thousands of rows constructs and retains excessive views, while a single TextView cannot represent a row-based interactive catalog.

Question 13

New Single answer

Topic: Lesson 8: Android Dailogs, Snackbar, Menus WebView and Notifications

Skill tested: Choose AlertDialog for a focused decision that requires a user's response.

A finance app is about to discard an unsaved payment form. The user must choose either to discard the changes or return to editing; the application should not silently proceed. The decision is brief, belongs to the current screen, and does not require a separate full-screen workflow or a temporary message. Which UI component best communicates this decision?

Correct Answer: A. An `AlertDialog` with explicit discard and continue-editing actions.
Explanation:

An AlertDialog is suited to a focused decision that requires the user's response before proceeding. Explicit discard and continue-editing actions make the consequences clear and let the app avoid losing data without confirmation. A Toast is informational and cannot collect a decision. A Snackbar is temporary feedback and, as described, has no action to resolve the choice. A ProgressBar communicates ongoing work rather than a decision.

Question 14

New Multiple answers

Topic: Lesson 9: Android Storage, SQLite and Content Providers

Skill tested: Distinguish SQLite persistence from content-provider-based data sharing.

A small inventory app stores structured records locally in SQLite. A separate application owned by the same organization must query a controlled subset of those records through Android's standard interprocess data-access mechanism. The inventory app remains responsible for its database schema, and the second app should not open the database file directly. Which two design elements best meet these requirements? Select TWO answers.

Correct Answer: A. Keep the SQLite database under the inventory app's control.; C. Expose permitted data through a ContentProvider that implements the required query operations.
Explanation:

SQLite can persist structured local records while remaining owned and managed by the inventory app. A ContentProvider provides a standard Android interface for controlled data access across application boundaries; the provider can expose only the permitted records and operations. Publishing the raw database file on external storage bypasses controlled access and exposes implementation details. SharedPreferences is intended for simple key-value settings, not relational records. Another app cannot ordinarily read the first app's private database directly.

Question 15

New Single answer

Topic: Lesson 10: Location-Aware Apps: Using GPS and Google Maps

Skill tested: Convert coordinates into a human-readable address using reverse geocoding.

A courier app receives latitude and longitude coordinates for a delivery point and must display a human-readable street address when one can be resolved. The app should keep the original coordinates for map placement and should not treat address lookup as a replacement for location capture. Which Android approach directly performs the required conversion?

Correct Answer: C. Use the `Geocoder` reverse-geocoding operation with the coordinates and handle the possibility that no address is returned.
Explanation:

Reverse geocoding resolves geographic coordinates to address information, and Android's `Geocoder` provides an API for that operation. The app should retain the coordinates for map placement and handle cases where a usable address cannot be resolved. A marker title is display text, not a geocoder. Repeated GPS requests cannot turn coordinates into an address, and JSON serialization changes the representation rather than resolving a location.