Google Associate Android Developer Exam Practice Test – Your Ultimate Exam Prep
Prepare confidently for the Google Associate Android Developer (AAD) Exam with Exam Sage’s comprehensive practice test. This carefully crafted exam prep resource is designed to help aspiring Android developers validate their skills and knowledge, ensuring they are ready to pass this industry-recognized certification.
What is the Google Associate Android Developer Exam?
The Google Associate Android Developer Exam is a professional certification that assesses your ability to build Android applications effectively using modern development tools, best practices, and core Android SDK components. It is ideal for developers seeking to demonstrate proficiency in building quality apps, managing UI components, handling data persistence, and writing efficient, maintainable code.
What You Will Learn with Our Practice Test
Our practice test covers all the essential skills you need to master, including:
Android UI development with Views, Fragments, and Jetpack Compose
Lifecycle management and state preservation using ViewModels and LiveData
Working with data persistence using Room and SQLite
Asynchronous programming with Kotlin Coroutines and Flow
Networking, REST APIs, and data synchronization
Dependency injection with Hilt for clean architecture
Effective use of Android Jetpack libraries such as Navigation, WorkManager, and Paging
Testing strategies including unit testing and UI testing
Handling runtime permissions, notifications, and background tasks
Why Choose Exam Sage for Your Android Developer Exam Preparation?
Exam Sage offers expertly designed, up-to-date practice exams that mirror the real Google Associate Android Developer certification test format and difficulty. Our questions come with detailed explanations to deepen your understanding and help you learn from mistakes. We ensure all content is written by subject-matter experts and reviewed for quality to provide a reliable, authentic learning experience.
Realistic practice environment to boost exam confidence
In-depth explanations for every question to enhance learning
Continuous updates reflecting the latest exam trends and Android development best practices
Accessible anytime, anywhere for flexible study schedules
Start your journey to becoming a certified Google Associate Android Developer with Exam Sage’s trusted practice test today, and take the first step towards advancing your Android development career.
Sample Questions and Answers
1. What is the main purpose of the ViewModel
class in Android Architecture Components?
A. To handle background tasks
B. To manage UI-related data in a lifecycle-conscious way
C. To bind XML layouts to Java code
D. To interact with databases
Answer: B
Explanation: The ViewModel
stores and manages UI-related data in a lifecycle-aware manner, surviving configuration changes like screen rotations.
2. Which component is not part of Android Jetpack?
A. Navigation
B. LiveData
C. WorkManager
D. IntentService
Answer: D
Explanation: IntentService
is part of the Android platform, not Android Jetpack. Jetpack includes modern libraries like Navigation and WorkManager.
3. Which method is used to start an Activity
for a result?
A. startActivity(Intent)
B. startActivityForResult(Intent, int)
C. launchActivity(Intent)
D. getResult(Intent)
Answer: B
Explanation: startActivityForResult()
is used to start an Activity when expecting a result back in onActivityResult()
.
4. What annotation ensures that a method runs only on the main thread?
A. @WorkerThread
B. @MainThread
C. @UiThread
D. @ThreadSafe
Answer: B
Explanation: @MainThread
is used to indicate that the method should be called only from the main UI thread.
5. Which LayoutManager would you use for a horizontal scrolling list in RecyclerView?
A. LinearLayoutManager(this)
B. GridLayoutManager(this, 2)
C. LinearLayoutManager(this, HORIZONTAL, false)
D. StaggeredGridLayoutManager(1, VERTICAL)
Answer: C
Explanation: To achieve horizontal scrolling, LinearLayoutManager
must be set with horizontal orientation.
6. What is the recommended way to persist large data sets in Android apps?
A. SharedPreferences
B. SQLite
C. Room
D. Internal Storage
Answer: C
Explanation: Room is the recommended abstraction over SQLite for storing large datasets with compile-time checks and modern APIs.
7. In MVVM, what typically communicates changes from data to UI?
A. ViewModel
B. LiveData
C. Repository
D. Data Binding
Answer: B
Explanation: LiveData
is lifecycle-aware and notifies observers (like UI components) when the data changes.
8. Which API allows navigation between fragments while maintaining back stack?
A. FragmentManager
B. NavHostFragment
C. Intent
D. Navigation Component
Answer: D
Explanation: Navigation Component provides a consistent way to implement navigation, including handling back stack automatically.
9. What does the @Query
annotation do in Room?
A. Marks a primary key
B. Specifies a database schema
C. Defines a SQL query
D. Declares a migration rule
Answer: C
Explanation: @Query
is used to define SQL queries in DAO interfaces.
10. Which method is used to inflate a layout in a RecyclerView Adapter?
A. View.inflate()
B. LayoutInflater.from().inflate()
C. inflateLayout()
D. getLayoutInflater()
Answer: B
Explanation: The correct approach is to use LayoutInflater.from(parent.getContext()).inflate(...)
.
11. What is the function of Manifest.permission.CAMERA
?
A. Grants access to external camera apps
B. Enables camera usage in an app
C. Grants root access
D. Enables app installation
Answer: B
Explanation: It declares that the app needs permission to access the device’s camera.
12. What is the correct way to observe a LiveData
in an Activity?
A. liveData.observe()
B. liveData.observe(this, Observer {})
C. liveData.setObserver()
D. liveData.subscribe()
Answer: B
Explanation: You observe LiveData with observe(this, Observer)
syntax inside an Activity or Fragment.
13. Which file contains metadata like app components and permissions?
A. build.gradle
B. AndroidManifest.xml
C. res/values/strings.xml
D. proguard-rules.pro
Answer: B
Explanation: The manifest file declares components, permissions, and other essential app-level metadata.
14. What does the @Insert
annotation in Room signify?
A. Create table
B. Add a column
C. Insert data into a table
D. Perform update
Answer: C
Explanation: @Insert
tells Room to insert a new entry into the associated database table.
15. What is the purpose of the onSaveInstanceState()
method?
A. Save preferences
B. Save UI state
C. Backup files
D. Save layouts
Answer: B
Explanation: This method saves UI-related data before an Activity is destroyed due to configuration changes.
16. Which library is used for efficient image loading in Android?
A. Volley
B. OkHttp
C. Picasso
D. Retrofit
Answer: C
Explanation: Picasso
is widely used for handling image loading and caching.
17. What does ProGuard do in Android apps?
A. Speed up app startup
B. Secure user data
C. Obfuscate and shrink code
D. Monitor memory
Answer: C
Explanation: ProGuard reduces APK size and makes reverse engineering harder by obfuscating the code.
18. What is the use of WorkManager
in Android Jetpack?
A. Manage Bluetooth devices
B. Schedule precise alarms
C. Execute deferrable, guaranteed background work
D. Handle UI rendering
Answer: C
Explanation: WorkManager
is designed for deferrable and guaranteed background execution.
19. What does the keyword suspend
do in Kotlin?
A. Blocks UI
B. Suspends the app
C. Marks a function to be used in a coroutine
D. Ends the coroutine
Answer: C
Explanation: suspend
marks a function as a coroutine, which can be paused and resumed without blocking threads.
20. Which tool is best for debugging layout issues visually?
A. Logcat
B. Lint
C. Layout Inspector
D. Firebase Analytics
Answer: C
Explanation: Layout Inspector provides a real-time view of the app’s UI hierarchy for layout debugging.
21. What is Parcelable
used for in Android?
A. Store preferences
B. Serialize objects to pass between components
C. Display notifications
D. Format layouts
Answer: B
Explanation: Parcelable
is an interface used to serialize data so it can be passed through Intents or Bundles.
22. Which class handles network calls in Retrofit?
A. Request
B. Callback
C. Call<T>
D. AsyncTask
Answer: C
Explanation: In Retrofit, Call<T>
is used to represent HTTP requests and responses.
23. What is a common cause of a NullPointerException
in Android?
A. Using a fragment
B. Declaring a val
C. Accessing an uninitialized object
D. Using a coroutine
Answer: C
Explanation: Accessing null or uninitialized references results in a NullPointerException
.
24. Which class allows backstack operations with Fragments?
A. FragmentTransaction
B. ActivityManager
C. FragmentFactory
D. IntentManager
Answer: A
Explanation: FragmentTransaction
allows you to add, replace, and remove fragments and manage the back stack.
25. Which folder contains app UI layouts?
A. res/raw
B. res/layout
C. src/java
D. res/drawable
Answer: B
Explanation: XML layout files go in the res/layout
directory.
26. Which data type is used in LiveData
?
A. MutableLiveData<T>
B. Flow<T>
C. Observable<T>
D. Single<T>
Answer: A
Explanation: MutableLiveData<T>
is a LiveData object that allows changes to its value.
27. What is the purpose of @HiltAndroidApp
in Dagger Hilt?
A. Configure navigation
B. Set default font
C. Initialize dependency injection
D. Handle image caching
Answer: C
Explanation: @HiltAndroidApp
sets up the application for Hilt-based dependency injection.
28. Which method releases system resources in an Activity?
A. onStart()
B. onResume()
C. onDestroy()
D. onCreate()
Answer: C
Explanation: onDestroy()
is called when an Activity is finishing and should be used to clean up resources.
29. Which XML attribute sets the width of a View to match its parent?
A. android:layout_width="wrap_parent"
B. android:layout_width="fill"
C. android:layout_width="match_parent"
D. android:width="100%"
Answer: C
Explanation: match_parent
tells the view to expand to the width of its parent container.
30. What is the purpose of DataBindingUtil.setContentView()
?
A. Sets a layout without inflation
B. Enables direct access to views in layout XML
C. Connects layouts with ViewModel
D. Initializes RecyclerView
Answer: B
Explanation: This method allows binding layouts to activity code and accessing views directly without findViewById
.
31. What is the primary benefit of using Kotlin over Java in Android development?
A. Higher compilation speed
B. Lower memory usage
C. Null safety and concise syntax
D. Better performance on old devices
Answer: C
Explanation: Kotlin offers null safety and more concise syntax compared to Java, reducing boilerplate and runtime errors.
32. Which keyword in Kotlin ensures a property is initialized later?
A. var
B. val
C. lateinit
D. lazy
Answer: C
Explanation: lateinit
is used for non-null variables that are initialized after declaration but before usage.
33. Which method is called when an Activity becomes visible to the user?
A. onCreate()
B. onResume()
C. onStart()
D. onRestart()
Answer: C
Explanation: onStart()
is called when the activity is about to become visible, and onResume()
when it starts interacting with the user.
34. What is the purpose of a sealed class
in Kotlin?
A. To implement singletons
B. To allow multiple inheritance
C. To restrict class hierarchies
D. To generate hash codes
Answer: C
Explanation: sealed
classes restrict class inheritance, making them ideal for handling limited state hierarchies.
35. How do you provide a default value to a parameter in Kotlin?
A. fun test(a int = 1)
B. fun test(a: Int = 1)
C. fun test(int a = 1)
D. fun test(Int a = 1)
Answer: B
Explanation: Kotlin syntax for default parameters is fun test(a: Int = 1)
.
36. Which tool is commonly used for unit testing in Android?
A. JUnit
B. Espresso
C. Robolectric
D. Mockito
Answer: A
Explanation: JUnit is the primary framework for writing unit tests in Android.
37. What does the @Test
annotation in JUnit signify?
A. It runs only if the device is connected
B. It marks a method as a test case
C. It benchmarks performance
D. It tests UI responsiveness
Answer: B
Explanation: @Test
tells JUnit to treat the method as a test case.
38. How can you test asynchronous LiveData in unit tests?
A. Using observeForever()
B. Using Espresso IdlingResource
C. Using CoroutineScope
D. Using observe(this)
Answer: A
Explanation: observeForever()
attaches a persistent observer, useful in tests without lifecycle constraints.
39. What is an Intent
in Android used for?
A. Declaring permissions
B. Designing layouts
C. Communicating between components
D. Accessing databases
Answer: C
Explanation: Intent
is used to launch Activities, Services, or communicate between components.
40. What happens if you forget to declare an Activity in the AndroidManifest.xml
?
A. App crashes on launch
B. Layout won’t load
C. Activity won’t start
D. It is added by default
Answer: C
Explanation: An undeclared Activity cannot be launched and will result in a RuntimeException
.
41. How do you make a TextView
accessible for screen readers?
A. Use android:focusable="false"
B. Use android:importantForAccessibility="yes"
C. Use contentDescription
D. Use android:gravity="center"
Answer: C
Explanation: contentDescription
provides text that can be read aloud by screen readers for accessibility.
42. Which is more memory efficient for large lists: ListView
or RecyclerView
?
A. ListView
B. RecyclerView
C. GridView
D. ScrollView
Answer: B
Explanation: RecyclerView
is more efficient as it reuses views with the ViewHolder pattern.
43. What is the purpose of ViewHolder
in a RecyclerView.Adapter
?
A. Inflate the layout
B. Handle animations
C. Cache view references for reuse
D. Bind LiveData
Answer: C
Explanation: ViewHolder pattern minimizes repeated findViewById
calls and improves performance.
44. How do you define a navigation graph in Android?
A. In strings.xml
B. In navigation.xml
resource
C. In manifest.xml
D. In Gradle
Answer: B
Explanation: A navigation graph is defined in a dedicated navigation
resource file with <navigation>
as the root tag.
45. What is the function of @Dao
in Room?
A. Marks database table
B. Provides database configuration
C. Declares data access operations
D. Runs SQL migrations
Answer: C
Explanation: @Dao
is used to declare methods for interacting with the database.
46. Which lifecycle callback is guaranteed to be called when an Activity is being destroyed?
A. onStop()
B. onPause()
C. onDestroy()
D. onRestart()
Answer: C
Explanation: onDestroy()
is always called when an Activity is finishing or being destroyed by the system.
47. What is LiveData.observe()
lifecycle-aware?
A. No
B. Yes, it only notifies active lifecycle owners
C. Only during onPause()
D. Only in background threads
Answer: B
Explanation: LiveData only notifies observers that are in an active lifecycle state (e.g., STARTED or RESUMED).
48. Which method in Hilt provides dependencies?
A. @Module
B. @Provides
C. @InstallIn
D. All of the above
Answer: D
Explanation: All are used together in Hilt to define modules and provide dependencies.
49. What is the purpose of @Composable
in Jetpack Compose?
A. Defines a dependency
B. Marks a UI function
C. Creates a new thread
D. Marks a background job
Answer: B
Explanation: @Composable
indicates that the function is a UI component in Jetpack Compose.
50. Which library helps with dependency injection in Android?
A. Retrofit
B. Hilt
C. Picasso
D. Glide
Answer: B
Explanation: Hilt (built on Dagger) provides an easy way to do dependency injection in Android apps.
51. What is Snackbar
in Android?
A. A debugging tool
B. A hidden navigation drawer
C. A brief message shown at the bottom of the screen
D. A type of menu bar
Answer: C
Explanation: Snackbar
shows a brief message with optional action at the bottom of the screen.
52. Which annotation is used to auto-generate code in Room entities?
A. @PrimaryKey(autoGenerate = true)
B. @AutoIncrement
C. @AutoGenerate
D. @DatabaseKey
Answer: A
Explanation: @PrimaryKey(autoGenerate = true)
lets Room automatically increment the primary key.
53. What is the correct order of Activity lifecycle methods when starting?
A. onCreate()
→ onStart()
→ onResume()
B. onStart()
→ onResume()
→ onCreate()
C. onResume()
→ onCreate()
→ onStart()
D. onCreate()
→ onResume()
→ onStart()
Answer: A
Explanation: That’s the correct order: onCreate()
→ onStart()
→ onResume()
.
54. What does StrictMode
help detect in Android?
A. XML layout errors
B. Network calls on the main thread
C. Incorrect Gradle configs
D. Database schema issues
Answer: B
Explanation: StrictMode
detects unwanted operations like disk or network access on the main thread.
55. What does RecyclerView.setHasFixedSize(true)
do?
A. Resizes items
B. Improves performance if item size is constant
C. Animates the list
D. Makes all items scroll horizontally
Answer: B
Explanation: Setting setHasFixedSize(true)
improves performance if all items are the same size.
56. Which annotation binds a ViewModel to a Fragment with Hilt?
A. @BindViewModel
B. @HiltViewModel
C. @InjectViewModel
D. @ProvideViewModel
Answer: B
Explanation: @HiltViewModel
prepares the ViewModel for dependency injection using Hilt.
57. What is the purpose of Flow
in Kotlin?
A. Handle one-time UI events
B. Represent cold asynchronous data streams
C. Inflate layouts
D. Replace LiveData
Answer: B
Explanation: Flow
is used for cold asynchronous streams and is part of Kotlin Coroutines.
58. How do you handle configuration changes in ViewModel?
A. Save state in Bundle
B. Use ViewModel
, which survives configuration changes
C. Use Intent
D. Disable rotation
Answer: B
Explanation: ViewModel
is retained during configuration changes like screen rotation.
59. What is Espresso
used for in Android testing?
A. Backend testing
B. Unit testing
C. UI interaction testing
D. Database testing
Answer: C
Explanation: Espresso
is used for automating UI tests by simulating user interactions.
60. What does @Entity
do in Room?
A. Declares a network model
B. Defines a table for Room database
C. Marks a class for navigation
D. Creates a layout
Answer: B
Explanation: @Entity
marks a Kotlin/Java class as a Room database table.