This Android quiz tests practical knowledge of Android application fundamentals, Kotlin, activities, intents, resources, layouts, app architecture, storage, lifecycle handling, and common development tools. Each question includes the correct answer and a concise explanation, so you can use the page for self-study, interview preparation, or classroom revision.
How to Use This Android Quiz
- Answer each question before reading the explanation.
- Give yourself one point for every correct answer.
- Review the linked Android documentation for topics you miss.
- Use the score guide at the end to identify areas that need more practice.
Android Fundamentals Quiz Questions
1. Which language is officially supported for modern Android development?
- Kotlin
- Ruby
- PHP
- Perl
Answer: Kotlin.
Kotlin is a first-class language for Android development and works with existing Java libraries and Android APIs.
2. What is the main purpose of the AndroidManifest.xml file?
- To store only application colors
- To declare application components, permissions, and app-level configuration
- To compile Kotlin source code
- To store database rows
Answer: To declare application components, permissions, and app-level configuration.
The manifest identifies components such as activities, services, broadcast receivers, and content providers. It can also declare permissions, intent filters, application metadata, and device requirements.
3. Which Android component normally represents a single screen with a user interface?
- Activity
- Service
- BroadcastReceiver
- ContentProvider
Answer: Activity.
An activity provides a window in which an application can draw its user interface. A screen may also contain one or more fragments or a Jetpack Compose UI hierarchy.
4. Which class is commonly used to send a request from one Android component to another?
- Intent
- BundleAdapter
- WindowManager
- ResourceLoader
Answer: Intent.
An intent can start an activity or service and can deliver a broadcast. Explicit intents identify a specific component, while implicit intents describe an action that a compatible component may handle.
5. Which directory normally contains Android string, color, dimension, and style resources?
- res/values
- src/assets
- res/raw/java
- build/resources
Answer: res/values.
Files in res/values define reusable resources such as strings, colors, dimensions, themes, and styles. Android generates resource identifiers that application code can reference.
Android Activity and Lifecycle Quiz
6. Which lifecycle callback is called when an activity is first created?
- onCreate()
- onDestroy()
- onPause()
- onRestart()
Answer: onCreate().
Initial setup is commonly performed in onCreate(), including restoring state, configuring the user interface, and connecting the activity to required objects.
7. Which callback indicates that an activity is no longer in the foreground?
- onPause()
- onAttach()
- onInflate()
- onBind()
Answer: onPause().
onPause() is called when the activity loses foreground focus. Work in this callback should remain brief because the next activity may be waiting to resume.
8. What should be used to preserve small pieces of transient UI state across activity recreation?
- Saved instance state or SavedStateHandle
- A hard-coded global variable only
- The APK file
- A broadcast permission
Answer: Saved instance state or SavedStateHandle.
Android may recreate an activity after a configuration change or process interruption. Small transient values can be stored in the saved-state mechanism, while durable application data should be placed in persistent storage or a data layer.
9. Which object is designed to hold UI-related data across configuration changes?
- ViewModel
- BroadcastReceiver
- PackageManager
- IntentFilter
Answer: ViewModel.
A ViewModel stores and manages UI-related data in a lifecycle-aware way. It should not hold references to short-lived views or activities that can cause memory leaks.
10. What happens when a device rotation causes an activity configuration change under the default behavior?
- The activity is normally recreated
- The application is permanently uninstalled
- The manifest is deleted
- The device restarts
Answer: The activity is normally recreated.
Recreation allows Android to load resources that match the new configuration, such as landscape layouts or updated dimensions.
Android UI, Views, and Jetpack Compose Quiz
11. In a traditional XML-based Android UI, which attribute uniquely identifies a view for code access?
- android:id
- android:versionName
- android:permission
- android:process
Answer: android:id.
The android:id attribute assigns a resource ID to a view. View binding, data binding, or findViewById() can then access it.
12. What does a Jetpack Compose function annotated with @Composable describe?
- A piece of user interface
- A database schema migration
- An APK signature
- A Gradle repository
Answer: A piece of user interface.
A composable function emits UI based on its inputs and current state. Compose updates affected parts of the UI through recomposition when observed state changes.
13. What is recomposition in Jetpack Compose?
- Re-running affected composable functions when state changes
- Reinstalling Android Studio
- Converting Kotlin into XML manually
- Restarting the operating system after every click
Answer: Re-running affected composable functions when state changes.
Compose tracks state read by composable functions and schedules updates when that state changes. Well-structured state helps keep recomposition predictable and efficient.
14. Which layout is designed to position views relative to constraints in an XML-based interface?
- ConstraintLayout
- ManifestLayout
- DatabaseLayout
- IntentLayout
Answer: ConstraintLayout.
ConstraintLayout can create flexible interfaces with a relatively flat view hierarchy by defining relationships between views and the parent layout.
15. Which resource type should be used for user-visible text that may need translation?
- String resources
- Hard-coded hexadecimal values
- Database indexes
- Signing keys
Answer: String resources.
Placing text in string resources supports localization, reuse, formatting, and language-specific resource directories.
Android Architecture and Data Quiz
16. Which architectural layer normally contains repositories and data sources?
- Data layer
- Presentation-only theme layer
- Manifest layer
- APK icon layer
Answer: Data layer.
The data layer coordinates application data from local storage, network services, caches, or other sources. A repository commonly exposes data to the rest of the app.
17. What is the purpose of the Room persistence library?
- To provide an abstraction layer over SQLite
- To replace the Android operating system
- To draw vector icons
- To sign release APK files
Answer: To provide an abstraction layer over SQLite.
Room uses entities, data access objects, and a database class to provide structured local database access with compile-time query verification.
18. Which Jetpack option is intended for storing small key-value preferences?
- DataStore
- RecyclerView
- FragmentManager
- MediaCodec
Answer: DataStore.
Preferences DataStore stores typed key-value pairs, while Proto DataStore stores strongly typed objects defined with protocol buffers.
19. Which Kotlin feature is commonly used for asynchronous work without blocking the main thread?
- Coroutines
- Annotations only
- Resource qualifiers
- Manifest placeholders
Answer: Coroutines.
Kotlin coroutines allow asynchronous tasks to be expressed with sequential-looking code. Android applications commonly use lifecycle-aware coroutine scopes to cancel work when the related component is no longer active.
20. Why should long-running work not be performed directly on Android’s main thread?
- It can freeze the interface and make the application unresponsive
- It changes the application package name
- It removes string resources
- It disables the manifest permanently
Answer: It can freeze the interface and make the application unresponsive.
The main thread handles user-interface events and drawing. Network, database, and CPU-intensive work should be moved to appropriate background execution mechanisms.
Android Components, Permissions, and Background Work Quiz
21. Which Android component performs work without providing a user interface?
- Service
- Activity
- View
- Layout resource
Answer: Service.
A service is an application component for work that does not need its own UI. It does not automatically create a background thread, so threading must still be handled correctly.
22. Which API is suitable for deferrable background work that should run reliably?
- WorkManager
- TextView
- Canvas only
- ActivityResultContract only
Answer: WorkManager.
WorkManager is designed for persistent, deferrable work that should run even if the application process exits. Constraints can be used to require conditions such as network availability or charging.
23. What must an application usually do before using a dangerous permission on supported Android versions?
- Declare it in the manifest and request it at runtime when required
- Rename the APK extension
- Delete the Gradle files
- Restart Android Studio in safe mode
Answer: Declare it in the manifest and request it at runtime when required.
Runtime permission requests should be made in context, and the application should handle both approval and denial without crashing.
24. Which component responds to broadcast messages from the system or other applications?
- BroadcastReceiver
- RecyclerView.Adapter
- RoomDatabase
- Drawable
Answer: BroadcastReceiver.
A broadcast receiver reacts to matching broadcast intents. Receivers should complete work quickly and hand longer tasks to an appropriate background API.
25. Which Android component provides a standard interface for sharing structured data between applications?
- ContentProvider
- ConstraintSet
- ViewBinding
- NotificationChannel
Answer: ContentProvider.
A content provider exposes data through content URIs and supports operations such as querying, inserting, updating, and deleting when access is permitted.
Android Build, Testing, and Debugging Quiz
26. Which build system is used by standard Android Studio projects?
- Gradle
- Makefile only
- Antivirus Manager
- SQLite shell
Answer: Gradle.
Gradle and the Android Gradle Plugin manage source sets, dependencies, build variants, packaging, testing, and related build tasks.
27. What is Logcat used for in Android development?
- Viewing system and application log messages
- Creating app icons automatically
- Publishing an app without a build
- Replacing all unit tests
Answer: Viewing system and application log messages.
Logcat helps developers inspect debug messages, warnings, stack traces, and system events from an emulator or connected device.
28. Which test type normally runs on the local development machine without an Android device?
- Local unit test
- Instrumented UI test
- Play Store review
- Device certification test
Answer: Local unit test.
Local unit tests run on the local JVM and are suitable for business logic that does not depend directly on the Android framework. Instrumented tests run on an Android device or emulator.
29. What does an Android emulator provide?
- A virtual Android device for running and testing applications
- A replacement for Kotlin syntax
- A web hosting server
- A database table generator only
Answer: A virtual Android device for running and testing applications.
The emulator can simulate different Android versions, display sizes, hardware profiles, network conditions, and other device characteristics. Testing on physical devices is still useful for real hardware behavior.
30. Which artifact is commonly uploaded to Google Play for a new Android application release?
- Android App Bundle
- Plain text source file
- Uncompiled XML directory
- Logcat archive
Answer: Android App Bundle.
An Android App Bundle contains compiled application code and resources. Google Play can use it to generate optimized APKs for different device configurations.
Android Quiz Score Guide
| Score | Suggested interpretation |
|---|---|
| 26-30 | You have a strong grasp of Android fundamentals. Review the explanations for any missed architecture or lifecycle details. |
| 20-25 | You understand the main concepts but should revise the areas in which you lost points. |
| 12-19 | Review activities, lifecycle state, intents, resources, architecture layers, and background work before retaking the quiz. |
| 0-11 | Start with Android fundamentals, then repeat the quiz section by section. |
Official Android Study Resources for Missed Questions
Use the official Android Kotlin fundamentals quizzes to check introductory concepts. For architecture topics, review the official Android architecture layers quiz. These resources are useful for confirming terminology and revising topics covered in this Android quiz.
Android Quiz Frequently Asked Questions
Is this Android quiz suitable for beginners?
Yes. The quiz begins with application components, resources, activities, and intents before moving into lifecycle handling, Jetpack Compose, architecture, data storage, permissions, testing, and build tools.
Does this Android quiz include Kotlin questions?
It includes Kotlin-related Android topics such as coroutines, composable functions, and modern Android development. It does not attempt to cover the full Kotlin language.
Are Android interview questions and Android quiz questions the same?
They overlap, but interview questions often require deeper explanations, design trade-offs, debugging examples, and project experience. This quiz focuses on checking core technical knowledge with objective answers.
Which Android topics should I revise after taking this quiz?
Revise the sections where you missed multiple answers. Common study areas include the activity lifecycle, state preservation, intents, permissions, architecture layers, Room, DataStore, coroutines, WorkManager, testing, and Gradle.
Can I use this Android quiz for classroom practice?
Yes. A teacher or trainer can hide the answer paragraphs, present the questions in sections, and use the score table for revision. The explanations also provide a basis for follow-up discussion.
Android Quiz Editorial QA Checklist
- Verify that activity lifecycle answers distinguish transient UI state from durable application data.
- Confirm that permission guidance reflects manifest declaration and runtime requests where applicable.
- Check that background-work questions do not imply that a Service automatically runs on a separate thread.
- Review Jetpack Compose terminology for correct use of state, composable functions, and recomposition.
- Retest official Android resource links and update questions when platform guidance changes.
TutorialKart.com