All 75 Android & Kotlin quiz questions below come with a short explanation, visible right on the page — no sign-in needed. They're grouped by beginner and intermediate levels and 75 subtopics, so you can revise one part at a time. Choose Try Android & Kotlin quiz above to take a scored run and review the questions you got wrong.
What the Android & Kotlin quiz covers
Images1
ANR1
App Links1
Storage Security1
Build Variants1
BroadcastReceiver1
In-app Updates1
Parallel Execution1
Performance Metrics1
File Sharing1
Duplicate Action Prevention1
Material Theming1
Code shrinking1
Collect theo lifecycle1
Compose Basics1
Build Tooling1
Coroutine Basics1
Coroutine scope1
Kotlin Syntax1
Adaptive Layout1
Lists in Compose1
Data class1
Dependency Injection1
Navigation1
Compose Navigation1
Extension function1
Feature flag1
Flow1
Flow operator1
Fragment1
Crash Monitoring1
Effects in Compose1
Intent1
Compose & View Interop1
Accessibility1
App Startup1
App Size1
Testing1
Layered Architecture1
Test Types1
Log1
Saving Settings1
File Storage1
Manifest1
State Modeling1
Modifier1
Multi-module1
Null safety1
Offline1
Analytics1
Pagination1
SDK Versions1
Process death1
Permissions1
Recomposition1
RecyclerView1
Memory Leaks1
Room1
Scope function1
Background Services1
Screen Back Stack1
State trong Compose1
Assets1
Network Layers1
Notifications1
In-app Messages1
Startup Optimization1
UI test1
val & var1
Legacy View System1
Activity Lifecycle1
WorkManager1
Coroutine Exception Handling1
Network Error Handling1
Store Requirements1
Beginner level — 20 Android & Kotlin questions
Question 1·Null safety
Why does Kotlin separate nullable and non-nullable types?
A.It lets a variable hold several different types
B.It speeds up object construction at runtime
C.It reduces the memory an object occupies
D.It moves null errors from runtime to compile time
Answer: D
Kotlin moves null errors from runtime to compile time. String cannot hold null, String? can, and the compiler forces you to handle the null case before accessing members. This is the main reason Android moved from Java to Kotlin.
B.The variable cannot be reassigned but the contents can change
C.Neither the variable nor the contents can change
D.The list is stored in a special memory region
Answer: B
val only prevents reassigning the variable, not mutating its contents. val list = mutableListOf(1) still allows list.add(2). For immutable contents you need a read-only list type — they are two different concepts.
D.Value equality, copying, and a descriptive string
Answer: D
A data class auto-generates value-based equals and hashCode, toString, copy, and component destructuring functions. So two objects with the same content are considered equal, which is critical for comparing state in the UI.
Rotating the screen recreates the Activity and loses data. What is the correct fix?
A.Keep the data in a ViewModel that survives the recreation
B.Lock the screen orientation so the Activity is not recreated
C.Refetch all the data from the server after rotation
D.Store the data in a static field of the class
Answer: A
Use ViewModel: it survives Activity recreation due to configuration changes, so data and screen state are preserved. Locking orientation only avoids one of many configuration change cases.
A.An explicit one can only open components in the same application
B.An explicit one is synchronous while an implicit one is asynchronous
C.An implicit one cannot carry data
D.An explicit one names the target while an implicit one lets the system choose
Answer: D
An explicit intent names the exact component to open, typically used inside the app. An implicit intent describes an action like sharing or opening a link, and the system picks an app that declares it can handle that action.
How does a Composable function differ from a regular function?
A.It returns a View object to attach to the interface tree
B.It always runs on a background thread so it does not block the interface
C.It is called exactly once in the screen's lifetime
D.It describes the interface and is called again when the state changes
Answer: D
A Composable function describes UI from the current state and is re-invoked when state it reads changes. The compiler adds tracking to re-run only functions that depend on changed data, instead of the whole tree.
A plain var counter inside a Composable does not update the UI. Why?
A.An ordinary variable is not tracked so nothing is redrawn
B.The variable must be declared at class level rather than in the function
C.The variable is reset because the Composable runs on another thread
D.Kotlin does not allow changing a variable inside a Composable
Answer: A
The UI only recomposes when a tracked value changes. A plain variable is not in the tracking system so nothing tells Compose to re-run, and its value is also reset on the next composition.
Which component should display a long list in Compose?
A.A lazy list building only what is visible
B.A box stacking the items on top of one another
C.An ordinary column combined with scrolling
D.A grid with a fixed column count
Answer: A
Use a lazy list because it only composes visible items. A regular Column with scrolling composes all elements immediately, so with a few hundred items the screen janks on open and wastes memory for its lifetime.
What does the suspend keyword mark about a function?
A.The function can suspend and resume without blocking the thread
B.The function runs in parallel with its caller
C.The function may not throw an exception outward
D.The function always runs on its own background thread
Answer: A
suspend marks a function that can pause and resume without blocking the thread. While waiting, the thread is returned for other work. It says nothing about which thread will run; the scheduler decides that.
Why should display strings live in resource files rather than in code?
A.So the strings cannot be read when decompiled
B.To reduce the installed package size
C.To speed up rendering the text
D.So they can be translated and edited in one place
Answer: D
Resources allow translating to the device language without conditions in code, and let content be edited in one place. The system picks the right file by language, region, screen density, and dark mode.
What is the app module Gradle configuration file for?
A.Storing the signing key used when publishing to the store
B.Holding the display strings and interface resources
C.Declaring the application's screens and permissions
D.Declaring the dependencies and the packaging configuration
Answer: D
The Gradle configuration file declares dependencies and packaging: minimum version, target version, build variants, code shrinking options. Permissions and app components are declared in the manifest file.
What is the core difference between the XML view system and Compose?
A.Compose only runs on newer devices
B.One issues update commands while the other is declarative
C.The old view system does not support complex animation
D.Compose cannot be used with existing Android libraries
Answer: B
The old view system is imperative: find a view then assign a new value. Compose is declarative: describe the UI from state and let the system update only what changed. This difference changes how all screen code is organized.
Why does RecyclerView reuse views of items scrolled off screen?
A.To reduce the application's packaged size
B.To avoid creating and destroying views constantly while scrolling
C.To save the scroll position automatically on rotation
D.To let the list show several layout types
Answer: B
Creating views is expensive, so reusing old views and only binding new data keeps the list smooth when scrolling fast. This is also why you must be careful with local state inside an item, because an old view can carry state over to another item.
A.A Fragment has no lifecycle like an Activity does
B.A Fragment can only be used with the old view system
C.A Fragment runs in a separate process
D.A Fragment lives inside an Activity and has its own lifecycle
Answer: D
A Fragment is a piece of UI hosted inside an Activity, with its own lifecycle and reusable. That lets the same UI piece work on phones and on a two-pane tablet layout.
When should a snack bar be used instead of a toast?
A.When the message needs an action such as undo
B.When the message must stay visible longer than five seconds
C.When the message must appear even with the app in the background
D.When several long lines of content must be shown
Answer: A
Use a snack bar when the message needs an accompanying action like undo, and when it belongs to the current screen. A toast only shows text, is not interactive, and is restricted on newer Android versions.
Why should verbose logging not remain in release builds?
A.The operating system refuses to run an app that writes logs
B.The logs can expose sensitive data
C.Logging noticeably increases the installed package size
D.The store rejects builds containing logging calls
Answer: B
Logs on the device are readable, so printing tokens, personal information, or API response content there is a real leak. Heavy logging in loops or while scrolling also costs resources.
How does a Kotlin when expression differ from a switch statement?
A.It returns a value and accepts arbitrary conditions
B.It can only match strings and integers
C.It does not allow several conditions in one branch
D.It requires a default branch in every case
Answer: A
when is an expression that returns a value and accepts arbitrary conditions, not just constant matching: type checks, range checks, or any boolean expression. Combined with sealed class, it is also checked for exhaustiveness at compile time.
A.They create a subclass inheriting from the extended class
B.They override a same-named method of the original class
C.They compile into static functions taking the object
D.They add a new method to the original class at runtime
Answer: C
Extension functions compile to a static function taking the object as a parameter. So they cannot see private members, do not participate in polymorphism, and are shadowed by a member function with the same name.
Permissions are declared in the app manifest file. For sensitive permissions, declaring them is not enough: since Android 6 you must also request them at runtime, and the user can deny them.
A.The minimum only affects the application's performance
B.The target decides which APIs are available while coding
C.Both decide which devices can install the app
D.Minimum: installable devices; target: Android behavior to follow
Answer: D
The minimum version decides which devices can install the app. The target version says the app has been verified against that version's behavior, and raising it means complying with new behavior changes.
An entire Compose screen recomposes when only one input changes. Why?
A.The input is not wrapped in a remembering component
B.The list items are missing keys
C.The state is read in a function too high up
D.Compose always redraws the whole tree when the state changes
Answer: C
The recomposition scope is the function that reads state. Reading a value in a higher-level function and passing it down makes the whole subtree rerun; reading it right where it is used, or passing a function that returns the value instead of the value, narrows the scope.
What is wrong with calling an API directly in a Composable body?
A.The API call is blocked until the interface finishes painting
B.The API result cannot be stored in state
C.The compiler refuses to compile that code
D.The API is called again every time the function runs again
Answer: D
Composables rerun many times and unpredictably, so an API call would repeat with them. Side effects must live in dedicated effect functions, where dependency keys control when they run.
Which scope should a coroutine launched in a ViewModel use?
A.The scope tied to the ViewModel, cancelled when it is cleared
B.A scope tied to the currently displayed Activity
C.A new scope created in each function that needs one
D.A global scope so the work is never interrupted
Answer: A
Use a scope tied to the ViewModel: every coroutine in it is cancelled automatically when the ViewModel is cleared. A global scope is never cancelled, so it holds references and keeps running after the screen is closed.
A.StateFlow always has a current value and drops duplicates
B.StateFlow runs on the main thread while SharedFlow does not
C.SharedFlow allows only one listener
D.SharedFlow cannot emit new values after creation
Answer: A
StateFlow represents state: it always has a current value, new collectors immediately receive the latest value, and a value equal to the previous one is skipped. SharedFlow represents events: it has no current value and does not skip duplicates.
Why should a ViewModel not hold an Activity Context?
A.A ViewModel runs in a separate process
B.The ViewModel outlives it so it retains the old Activity
C.A Context cannot be passed through a ViewModel's constructor
D.A Context cannot be used from a background thread
Answer: B
A ViewModel survives Activity recreation, so holding a reference to an Activity keeps the old Activity in memory after rotation. When a Context is needed, use the application Context.
What advantage does a Room query returning Flow have over returning a list?
A.The query runs safely on the main thread automatically
B.The interface updates itself when the table's data changes
C.The query runs faster thanks to caching
D.The return type need not be declared in the data access class
Answer: B
A query returning Flow is re-emitted by Room whenever the related table changes, so the UI updates after a write without re-querying. This is how the database becomes the single source of truth.
Which mechanism runs a task reliably even if the app is killed?
A.A timer reset each time the app opens
B.The system's work scheduler
C.A background thread created directly in the Activity
D.A coroutine in the application's global scope
Answer: B
Use the system's job scheduler. The work is persisted and runs when constraints are met, such as network availability or charging, surviving app termination and even device reboot.
What problem does dependency injection solve in an Android app?
A.Speeding up the application's startup
B.Separating object creation from where it is used
C.Managing every object's lifecycle automatically
D.Reducing how many classes the project needs
Answer: B
It separates object creation from where it is used, so dependencies can be swapped in tests and object lifetimes are declared in one place. Without it, classes create their own dependencies and tests are forced to hit the real network or database.
After two denials on Android, what happens on the next permission request?
A.The system suspends the permission for the app for a day
B.The dialog still appears with a do-not-ask-again option
C.No dialog appears and it returns a denial immediately
D.The permission is granted automatically at a restricted level
Answer: C
The call returns denied immediately without showing a dialog. The app must detect this state, explain why the permission is needed and provide a button to open app settings, while keeping features that don't need the permission usable.
What is the classic memory leak source on Android?
A.Loading images from the network rather than from resources
B.Creating too many objects inside a loop
C.Using a list instead of an array for large data
D.A long-lived object holding a reference to an Activity
Answer: D
A long-lived object like a singleton, static variable, listener, or uncancelled coroutine holds a reference to the Activity. Since the Activity is recreated on every rotation, each rotation leaks another old instance.
When does the application-not-responding dialog appear on Android?
A.When the app makes too many simultaneous network requests
B.When the main thread is blocked for too long
C.When the app runs in the background beyond the allowed time
D.When the app uses more memory than allowed
Answer: B
When the main thread is blocked for too long and cannot handle input events within the system timeout. Common causes are file I/O, database queries, or parsing large data synchronously on the main thread.
Enabling code shrinking crashes the release build during JSON parsing. Why?
A.Shrinking corrupts the JSON strings received
B.The release build lacks network permission
C.The class and field names are renamed by the shrinker
D.The parsing library only works in debug mode
Answer: C
Shrinking renames classes and fields, while the parsing library maps by name at runtime. You must add keep rules for data model classes, or use a library that generates code at compile time to avoid name dependence.
What most effectively reduces the download size of an Android app?
A.Drop some of the supported languages
B.Recompress every image in the resources directory
C.Publish an app bundle rather than a universal installer
D.Convert the Java code to Kotlin to reduce the line count
Answer: C
Publish an app bundle: the store generates a tailored install for each device's architecture, screen density, and language. Combined with code shrinking and removing unused resources, these give the biggest size reduction.
What problem comes from passing a large data object between screens?
A.The data is encrypted so the destination screen cannot read it
B.The system refuses to open the new screen
C.It exceeds the transfer size limit and crashes the app
D.The destination screen always receives an empty copy
Answer: C
There is a size limit for data passed between components, and exceeding it crashes the app with a cryptic error. The correct way is to pass an ID and let the destination screen load the data from a shared source.
Replace the repository with a fake to avoid network dependency, and replace the dispatcher with a test dispatcher to control timing. This makes tests run in milliseconds and deterministic.
What changes when you swap padding and background in a modifier chain?
A.Nothing changes since the order is irrelevant
B.The app errors while building the interface
C.A different area gets the background colour
D.Only the touch area changes while the display stays the same
Answer: C
Modifiers apply in declaration order. Putting padding before background leaves padding outside the colored area; putting background before padding makes the color cover the padding. The touch area also changes, so order is significant.
How should Compose navigation pass data between screens?
A.Store it in a global variable the next screen reads
B.Pass an identifier and let the destination fetch the data
C.Use one ViewModel shared across the whole application
D.Pass the whole object as a navigation argument
Answer: B
Pass the ID in the route and let the destination screen load data from the repository. This allows deep links to open the screen directly and lets the system restore the screen from saved arguments if the process is killed.
How should a list of several thousand server records be handled?
A.Cap the list at the first hundred records
B.Paginate and keep only what is currently needed
C.Fetch it all at once and filter in memory
D.Fetch it all and save it to a JSON file on the device
Answer: B
Use pagination: load by page, keep only what is needed in memory, and auto-load more when the user scrolls near the end. Combined with a local cache, reopening the screen is instant and the app remains usable on flaky networks.
Why is DataStore recommended over SharedPreferences?
A.The data is encrypted on the device by default
B.The API is asynchronous and safer with respect to threading
C.It synchronizes automatically to the user's account
D.It allows querying the data like a database
Answer: B
DataStore has an asynchronous API based on data streams, explicit error handling, and avoids synchronous calls that block the main thread, a common source of ANRs. It is still not encrypted, so tokens must be kept in secure storage.
D.At the network client layer, shared by every call
Answer: D
Put it in the network client layer: catch the 401 response, refresh the token, then replay that exact request once. Lock so parallel requests trigger only one refresh, otherwise you get overlapping refresh chains.
An image list gets the app killed for memory. Main cause?
A.The images decode at their original size even when shown small
B.The list items lack stable keys
C.The images are refetched from the server repeatedly
D.The list keeps too many items in memory
Answer: A
Image memory is based on decoded pixel dimensions, roughly width times height times four bytes. A full camera image takes tens of megabytes even when displayed in a small box, so you must request a downsampled image or set the decode size.
What is the main benefit of splitting an Android project into modules?
A.The app size drops because the code is split up
B.Each module runs in its own process
C.The dependency boundaries are enforced and builds are faster
D.No tests are needed for the secondary modules
Answer: C
Two main benefits: tool-enforced dependency boundaries so nobody accidentally calls into another feature's internals, and faster rebuilds because only the modified module and its dependents need recompiling.
What is needed to install test and production builds side by side?
A.A different display name per build
B.A different signing key per variant
C.A different application identifier per variant
D.A different version number between the two builds
Answer: C
The application ID must differ, usually by adding a suffix for the debug variant and for each environment. Along with that, change the display name and icon so testers know for sure which build they are opening.
Notifications do not appear on Android 13 although the sending code runs. Why?
A.Notifications must be sent from a background service
B.The system blocks notifications for the first twenty-four hours
C.Notification channels only work in a debug build
D.The notification permission must be requested at runtime
Answer: D
From Android 13, notifications are a runtime permission, so you must request it and the user can deny it. Also, from Android 8 every notification must belong to a channel, and if the channel has not been created the notification will not appear.
Use it for ongoing work the user is aware of: playing music, recording a route, downloading large files. The system requires a notification to be shown, and from Android 14 you must also declare the service type with a reason at release time.
An app must save a captured photo to the shared gallery. What is the current correct way?
A.Write straight into the pictures directory by absolute path
B.Request external storage write permission and write as before
C.Save it in the app's own directory and tell the user
D.Write through the system's media store
Answer: D
Write through the system media store: create a record, then write data into the stream you receive. From Android 10, scoped storage does not let apps freely write to shared storage by path.
An https link opens the browser instead of the app. What step is missing?
A.A domain verification file on the server
B.Register the domain with the app store
C.Enable link opening in the device settings
D.Declare a custom scheme for the application
Answer: A
The assetlinks.json file is missing from the correct well-known path on https, with a matching signing certificate fingerprint. Without it, the link is treated as an ordinary web link and opens in the browser.
B.A preferences store with a self-written encrypted string
C.A key protected by the system's keystore
D.A variable in memory, logging in again on each launch
Answer: C
Use a key protected by the system keystore to encrypt data before storing it. The key lives in secure hardware so it cannot be extracted, and it can require user authentication before use.
What does an icon-only Android button need for TalkBack users?
A.An icon larger than the recommended size
B.Clearer press feedback
C.A colour with higher contrast against the background
D.A content description saying clearly what the action does
Answer: D
It needs a content description that states the action, not the visual: reading out "save post" is useful, while reading out "star icon" is not. Purely decorative icons should be marked so the screen reader skips them.
What is the most robust way for Compose UI tests to find elements?
A.By the declaration order in the source
B.By the name of the Composable function being built
C.By the element's position on the screen
D.By the displayed text and the accessibility labels
Answer: D
Find by what the user can perceive: displayed text, accessibility labels, or test tags when needed. This describes behavior rather than structure, so refactoring a component doesn't break the test.
How do tests on the development machine differ from tests on a device?
A.The on-device kind cannot access a database
B.The on-machine kind cannot test asynchronous logic
C.The on-machine kind is faster but has no real platform APIs
D.The on-device kind cannot run in continuous integration
Answer: C
Tests on the development machine run in milliseconds but have no real Android platform, so anything touching the system must be mocked. Tests on a device use real APIs but are hundreds of times slower.
B.let runs the block on a background thread while apply does not
C.apply returns the object while let returns the result
D.apply can only set properties rather than call functions
Answer: C
apply returns the object itself and refers to it via implicit context, good for configuration. let returns the block's result and takes the object as a parameter, good for transforming a value or handling a non-null value.
What benefit does modelling screen state with a sealed class bring?
A.The compiler catches a missing branch
B.The interface redraws itself without a state flow
C.The state is saved automatically when the process is killed
D.It reduces how many classes the project must declare
Answer: A
The set of subclasses is closed, so a when expression is checked for exhaustiveness at compile time. Adding a new state and forgetting to handle it somewhere breaks the build immediately, instead of surfacing when a user hits a blank screen.
The OS killed the backgrounded app and typed input is gone. How do you handle it?
A.Keeping the data in a ViewModel is enough
B.Keep the app alive with a background service
C.Catch an event before the app is killed to save
D.Save through the system's saved state mechanism
Answer: D
Use saved state: small, critical data such as in-progress input is written into a bundle the system retains, so when the user returns the screen is rebuilt exactly as before. A ViewModel alone is not enough.
Store crash reports show only shortened class names. What is missing?
A.Debug mode enabled in the released build
B.A stable network connection when the crash happened
C.Permission to write logs on the user's device
D.The mapping file for exactly the released build
Answer: D
The mapping file matching the exact version is missing. Release builds shrink and obfuscate symbols, so the mapping file must be uploaded to the monitoring service on every release, and native code also needs its own symbol file.
Why must an app raise its target API level periodically?
A.The target version decides the minimum devices supported
B.The store requires it to keep accepting updates
C.The app will not run on newer devices
D.The compiler refuses to build with an older version
Answer: B
Stores set target version requirements and reject updates that don't meet them. Raising the target version also means complying with OS behavior changes, and that is the part that really costs effort.
The app takes seconds to show its first screen. Where do you look first?
A.Initialization running synchronously as the app opens
B.The number of components on the first screen
C.The device's network speed when the app opens
D.The size of the splash screen's background image
Answer: A
Look at synchronous initialization in the Application class: analytics, ads, and crash monitoring libraries often initialize on startup. Keep only what's required before the first frame and defer the rest.
How should an app force an update when old versions stop being compatible?
A.Rely on the store's automatic updates
B.Lock the accounts of users who have not updated
C.The server publishes a minimum version
D.Embed the minimum version in the application code
Answer: C
Have the server announce a minimum version and the app check it on startup, combined with the platform's in-app update mechanism so users don't have to leave the app.
Base it on the window size class, not the device type. Foldables and split-screen mode make the window smaller than the screen, so any tablet-or-phone assumption is wrong in those cases.
Two fast taps on submit create two orders. What is the durable fix?
A.Disable the button inside the tap handler
B.Debounce the tap event for about a second
C.A lock at the state layer plus an idempotency key
D.Show a confirmation dialog before submitting
Answer: C
Two layers are needed: an in-flight flag in the state layer to block the second call and put the button into a waiting state, and an idempotency key sent with the request so the server recognizes the retry and returns the same old record.
What happens when a UI collects a flow without lifecycle awareness?
A.The application errors when the screen closes
B.The data flow stops emitting as soon as focus is lost
C.It keeps processing updates while the screen is not visible
D.New data is lost until the screen reopens
Answer: C
Collection keeps running when the screen is in the background, so it wastes battery and network on data nobody sees. The right way is to collect in a lifecycle-aware scope, so listening pauses when the UI is not visible and resumes when it returns.
Opening a push notification repeatedly stacks duplicates of the same screen. Why?
A.The stack is cleared each time the app goes to the background
B.The server sends the same notification several times
C.Each opening creates a new instance
D.The system does not allow returning to the old screen
Answer: C
By default each open creates a new instance. You need to configure the launch mode or set intent flags to reuse the existing instance, and handle new data in the intent-receiving callback instead of only in the creation function.
How should an app share its own file with another app?
A.Pass the file's absolute path through an intent
B.Upload the file to a server and send a link
C.Grant temporary access through a content URI
D.Copy the file to shared storage and send that path
Answer: C
Use FileProvider to create a content URI and grant temporary read permission to the receiving app. Passing an absolute path does not work because other apps lack permission to access your private directory.
What happens when a child coroutine throws inside a coroutineScope?
A.The exception is swallowed and does not propagate
B.Only that coroutine stops while the others carry on
C.The application closes immediately and the error cannot be caught
D.The sibling coroutines are cancelled too
Answer: D
In a regular scope, a failed child coroutine cancels its sibling coroutines and propagates the error outward. To keep branches independent, use a supervisor scope, where one child's failure does not take down the others.
Three independent API calls for one screen: how do you make it fastest?
A.Launch them in parallel and await all three together
B.Run each call on its own operating system thread
C.Call them sequentially and await each one
D.Combine the three into one by chaining them
Answer: A
Launch all three in parallel and await the results together, instead of waiting sequentially. The total time then equals the slowest call rather than the sum of all three, and on mobile networks this difference is very noticeable.
C.A cold flow reruns its source for each collector
D.A cold flow cannot emit values asynchronously
Answer: C
A cold flow re-runs its data-producing part for each collector, so two screens collecting it will call the source twice. A hot flow emits a single shared stream to all listeners, and a late subscriber may miss earlier values.
What should a repository return when a network call fails?
A.Null so the caller infers it was an error
B.Throw the network library's exception outward
C.An empty list so the interface shows an empty state
D.A result type stating clearly whether it succeeded or failed
Answer: D
Return an explicit result type that distinguishes success from failure, with an error type meaningful to the app such as no network, session expired, or server error. Returning null or an empty list loses information and misleads the user.
An app must read data offline. Which architecture fits?
A.Preload all the data when the app opens
B.Show a message asking the user to enable the network
C.Cache the network responses in memory
D.A local database as the source of truth
Answer: D
Make the local database the source of truth: downloaded data is written to the table, and the UI only observes the table. This way the screen can always show existing content, and losing network only affects how fresh the data is.
A legacy view-based project wants new screens in Compose. What is a sensible approach?
A.Rewrite the whole application in Compose in one go
B.Embed Compose in the new screens and keep the old ones
C.Build a parallel new app and move users across
D.Wait until there is spare time to convert everything
Answer: B
Migrate gradually: write new screens in Compose and embed them into the existing structure, while leaving old screens untouched until they truly need changes. The two systems interoperate in both directions, so no big rewrite is needed.
What risk comes with dynamic colour taken from the user wallpaper?
A.The feature only works in dark mode
B.The app must request permission to read the wallpaper
C.The palette changes so the contrast may not hold
D.The app can no longer use its brand colours
Answer: C
The palette is generated by the system from the wallpaper, so it is unpredictable. Always use role-based colour pairs like background and the text colour on that background, instead of picking text colours yourself, otherwise some combination will lack contrast.
Which mobile-specific problem do feature flags address?
A.Turning off a broken feature without waiting for a new release to be approved
B.Replacing the need for testing before release
C.Reducing the size because disabled features are not bundled
D.Updating the interface without releasing new code
Answer: A
On mobile, a bug fix must go through review and users may not update for weeks. Feature flags let you instantly disable a broken feature on already-installed builds, and gradually roll out a new feature to a subset of users.
Question 52·Performance Metrics· select all that apply
Which store metrics reflect the technical quality of an app?
A.The number of downloads in the past week
B.The crash-affected session rate
C.The rate of sessions reported as not responding
D.The startup time at the high percentiles
Answer: B, C, D
Three core technical metrics: crash rate, ANR rate, and startup time. Exceeding the store's thresholds also affects whether the app gets featured in search results.
What lasting damage comes from ad-hoc analytics event names?
A.The analytics service rejects names not following a standard
B.A convention reduces the amount of data sent
C.Historical data already recorded cannot be renamed
D.The event name affects the application's performance
Answer: C
Recorded data cannot be renamed, so a loose convention leaves permanent damage: near-identical events can't be merged and metrics before and after can't be compared.
Why have manifest-registered broadcast receivers become less usable?
A.They only work while the app is open
B.They require a special permission the store does not approve
C.The system restricts many kinds of implicit broadcast
D.BroadcastReceiver has been removed from Android
Answer: C
Waking up many apps for every system event drains battery, so the platform has restricted many implicit broadcasts across versions. The replacement is a job scheduler with appropriate constraints.
What does a startup optimisation profile do for an Android app?
A.It lets the application run longer in the background
B.It reduces the application's installed size
C.It speeds up all the application's network calls
D.The hot-path code is compiled ahead of time
Answer: D
This profile lists the code paths that run often at startup and during key interactions, so they get ahead-of-time compiled instead of interpreted on first run. The clearest result is much faster startup and first-scroll after install.