PrepIQ Associate Android Developer Ultimate Exam, Exams of Technology

Exam preparation for Android development, including app architecture, UI design, Kotlin/Java fundamentals, activities, lifecycle, data storage, APIs, testing, debugging, and deployment practices.

Typology: Exams

2025/2026

Available from 06/11/2026

shilpi-jain-2
shilpi-jain-2 🇮🇳

1

(1)

25K documents

1 / 50

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
PrepIQ Associate Android Developer
Ultimate Exam
**Question 1.** Which component is responsible for providing a user interface in an
Android app?
A) Service
B) BroadcastReceiver
C) Activity
D) ContentProvider
Answer: C
Explanation: An Activity represents a single screen with a UI and handles user
interaction.
**Question 2.** In Android, which file defines the app’s manifest, including
components, permissions, and SDK versions?
A) build.gradle
B) AndroidManifest.xml
C) strings.xml
D) proguard-rules.pro
Answer: B
Explanation: AndroidManifest.xml declares the app’s structure, components,
required permissions, and supported SDKs.
**Question 3.** Which method is called when an Activity becomes visible to the
user?
A) onCreate()
B) onStart()
C) onResume()
D) onPause()
Answer: C
Explanation: onResume() is invoked after onStart() when the Activity is ready for
user interaction.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32

Partial preview of the text

Download PrepIQ Associate Android Developer Ultimate Exam and more Exams Technology in PDF only on Docsity!

Ultimate Exam

Question 1. Which component is responsible for providing a user interface in an Android app? A) Service B) BroadcastReceiver C) Activity D) ContentProvider Answer: C Explanation: An Activity represents a single screen with a UI and handles user interaction. Question 2. In Android, which file defines the app’s manifest, including components, permissions, and SDK versions? A) build.gradle B) AndroidManifest.xml C) strings.xml D) proguard-rules.pro Answer: B Explanation: AndroidManifest.xml declares the app’s structure, components, required permissions, and supported SDKs. Question 3. Which method is called when an Activity becomes visible to the user? A) onCreate() B) onStart() C) onResume() D) onPause() Answer: C Explanation: onResume() is invoked after onStart() when the Activity is ready for user interaction.

Ultimate Exam

Question 4. What is the primary purpose of the ViewModel class in Android Architecture Components? A) Manage UI navigation B) Store and manage UI-related data in a lifecycle-aware way C) Perform background network calls D) Persist data to SQLite Answer: B Explanation: ViewModel survives configuration changes and holds UI data for the Activity/Fragment. Question 5. Which of the following is the correct way to declare a RecyclerView adapter in Kotlin? A) class MyAdapter : RecyclerView.Adapter() { … } B) class MyAdapter extends RecyclerView.Adapter { … } C) class MyAdapter implements RecyclerView.Adapter { … } D) class MyAdapter : RecyclerView.Adapter { … } Answer: A Explanation: Kotlin uses the colon (:) for inheritance and generics are specified after the class name. Question 6. Which Android component is best suited for performing long-running background work that must continue even if the app is closed? A) AsyncTask B) Service C) Thread D) HandlerThread Answer: B Explanation: A Service runs in the background independent of UI and can continue after the UI is destroyed. Question 7. What is the purpose of the Android Jetpack Navigation component?

Ultimate Exam

C) android-library D) kotlin-kapt Answer: B Explanation: The 'com.android.application' plugin activates Data Binding when dataBinding { enabled = true } is set. Question 11. In Android, which permission is required to read the device’s contacts? A) READ_EXTERNAL_STORAGE B) READ_CONTACTS C) ACCESS_FINE_LOCATION D) WRITE_CONTACTS Answer: B Explanation: READ_CONTACTS grants read-only access to the user's contacts database. Question 12. Which class is used to schedule exact alarms that fire even when the device is idle? A) AlarmManager.set() B) AlarmManager.setExactAndAllowWhileIdle() C) JobScheduler.schedule() D) WorkManager.enqueue() Answer: B Explanation: setExactAndAllowWhileIdle() schedules precise alarms that bypass Doze mode. Question 13. What is the purpose of the android:exported attribute in a component declaration? A) To define the component’s visibility to other apps B) To specify the component’s launch mode C) To enable data binding for the component

Ultimate Exam

D) To set the component’s target SDK version Answer: A Explanation: android:exported determines whether other applications can invoke the component (e.g., Activity, Service, BroadcastReceiver). Question 14. Which method of SharedPreferences is used to retrieve a stored integer value? A) getInt(String key, int defValue) B) getInteger(String key, int defValue) C) retrieveInt(String key, int defValue) D) fetchInt(String key, int defValue) Answer: A Explanation: SharedPreferences provides getInt() to read an integer with a default fallback. Question 15. When using Room, which annotation marks a class as an entity for a SQLite table? A) @Database B) @Dao C) @Entity D) @Table Answer: C Explanation: @Entity identifies a Kotlin/Java class as a table representation in Room. Question 16. Which of the following statements about Android’s LiveData is FALSE? A) It is lifecycle-aware and only updates active observers. B) It can be used to emit data from a background thread without additional handling. C) It requires manual removal of observers to avoid memory leaks.

Ultimate Exam

D) Disable rotation in the manifest Answer: B Explanation: Retaining data through ViewModel or a retained Fragment preserves state without blocking system-managed restarts. Question 20. What does the android:windowSoftInputMode="adjustResize" attribute do? A) Hides the soft keyboard automatically B) Resizes the activity’s root view when the keyboard appears C) Prevents the keyboard from appearing D) Forces the keyboard to overlay the UI without resizing Answer: B Explanation: adjustResize causes the window to shrink, allowing the layout to reposition when the soft keyboard shows. Question 21. Which of the following is a correct way to start an Activity for a result using the modern Activity Result API? A) startActivityForResult(intent, REQUEST_CODE) B) registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), callback).launch(intent) C) onActivityResult(requestCode, resultCode, data) D) startActivity(intent) Answer: B Explanation: The Activity Result API replaces startActivityForResult with a contract-based approach. Question 22. Which Android component is primarily used to provide a searchable interface over a data set? A) ContentProvider B) SearchView C) CursorAdapter

Ultimate Exam

D) Loader Answer: C Explanation: CursorAdapter binds a Cursor (often from a ContentProvider) to a ListView, enabling efficient searchable lists. Question 23. What is the default launch mode for an Activity if none is specified? A) singleTop B) singleTask C) standard D) singleInstance Answer: C Explanation: The standard launch mode creates a new instance each time the Activity is launched. Question 24. Which annotation is used to indicate that a method should be executed on a background thread when using Android’s Architecture Components? A) @WorkerThread B) @BackgroundThread C) @AsyncTask D) @IOThread Answer: A Explanation: @WorkerThread signals that the method must not run on the UI thread. Question 25. In Kotlin, what is the purpose of the by lazy delegate when declaring a property? A) To make the property immutable B) To initialize the property only when it is first accessed C) To synchronize access across threads D) To share the property across multiple classes

Ultimate Exam

Explanation: Gson (or Moshi) can map JSON strings to POJOs via reflection or generated adapters. Question 29. Which UI element is most appropriate for displaying a set of mutually exclusive options? A) CheckBox B) Switch C) RadioGroup with RadioButton D) ToggleButton Answer: C Explanation: RadioGroup enforces a single selection among RadioButton children. Question 30. In Android, which method must be overridden to handle a click event for a view defined in XML using android:onClick="myClick"? A) public void myClick(View view) B) public void onClick(View view) C) public void handleClick(View view) D) public void click(View view) Answer: A Explanation: The method name must match the XML attribute and accept a single View parameter. Question 31. What does the android:allowBackup="false" attribute prevent? A) The app from being installed on external storage B) The app’s data from being backed up to Google Drive via Auto Backup C) The app from receiving updates D) The app from accessing the internet Answer: B Explanation: Setting allowBackup to false disables the Auto Backup feature for the app’s private data.

Ultimate Exam

Question 32. Which component is responsible for providing a persistent key-value store that survives app restarts? A) SQLiteDatabase B) ContentProvider C) SharedPreferences D) FileOutputStream Answer: C Explanation: SharedPreferences stores primitive data in an XML file that persists across launches. Question 33. Which of the following is the correct way to declare a sealed class in Kotlin? A) sealed class Result { … } B) final sealed class Result { … } C) abstract sealed class Result { … } D) immutable sealed class Result { … } Answer: A Explanation: The sealed modifier is placed before class (or interface) without additional modifiers. Question 34. Which Android library provides a reactive, stream-based API for handling UI events and asynchronous data? A) RxJava B) LiveData C) Coroutines Flow D) AsyncTask Answer: C Explanation: Flow is part of Kotlin Coroutines and offers a cold, asynchronous stream API suitable for UI events.

Ultimate Exam

Question 38. Which Gradle dependency is required to use the Navigation component’s Safe Args plugin in Kotlin? A) implementation "androidx.navigation:navigation-fragment-ktx:2.5.0" B) kotlin("androidx.navigation.safeargs") version "2.5.0" C) classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.0" D) apply plugin: "androidx.navigation.safeargs.kotlin" Answer: C Explanation: The Safe Args Gradle plugin is added via the buildscript classpath; the Kotlin DSL variant uses apply plugin. Question 39. Which Android manifest element is used to declare a custom permission that other apps can request? A) B) C) D) Answer: B Explanation: defines a new permission that other apps may request with. Question 40. Which of the following is the correct way to add a click listener to a view using Kotlin synthetic properties (deprecated but still valid in older projects)? A) button.setOnClickListener { /.../ } B) button.onClick { /.../ } C) button.click { /.../ } D) button.addClickListener { /.../ } Answer: A Explanation: Synthetic properties expose view IDs directly; you attach listeners via setOnClickListener.

Ultimate Exam

Question 41. What is the purpose of the android:foregroundServiceType attribute introduced in API 28? A) To specify the type of work a foreground service performs (e.g., location, media) for permission enforcement B) To define the notification channel ID C) To indicate whether the service runs in the foreground or background D) To set the priority of the service Answer: A Explanation: The attribute lists allowed foreground service types, helping the system enforce runtime permissions. Question 42. Which of the following is true about WorkManager? A) It can schedule tasks that require immediate execution only. B) It guarantees execution even after device reboot and app termination. C) It cannot run on API levels below 21. D) It replaces AlarmManager for all use-cases. Answer: B Explanation: WorkManager persists work via JobScheduler, AlarmManager, or a custom scheduler, ensuring execution across reboots. Question 43. In Android, which method of Context is used to retrieve a system service such as LayoutInflater? A) getSystemService(Class serviceClass) B) getService(String name) C) obtainService(Class serviceClass) D) fetchSystemService(String name) Answer: A Explanation: Context.getSystemService() returns the requested service; the generic version is preferred.

Ultimate Exam

Question 47. In Android, which of the following is the correct way to declare a coroutine scope tied to a Fragment’s view lifecycle? A) viewLifecycleOwner.lifecycleScope B) lifecycleScope.launchWhenStarted { … } C) viewModelScope D) GlobalScope Answer: A Explanation: viewLifecycleOwner.lifecycleScope is cancelled when the Fragment’s view is destroyed, preventing leaks. Question 48. Which of the following is NOT a valid android:launchMode value? A) singleInstance B) singleTask C) singleTop D) singleRun Answer: D Explanation: singleRun is not a defined launch mode; the others are valid. Question 49. Which of these libraries provides a type-safe HTTP client generated from an OpenAPI/Swagger definition? A) Retrofit B) Volley C) OkHttp D) FastAndroidNetworking Answer: A Explanation: Retrofit can be paired with code generators (e.g., Swagger Codegen) to produce type-safe API interfaces. Question 50. What is the primary purpose of the android:requestLegacyExternalStorage flag in the manifest?

Ultimate Exam

A) To enable legacy storage behavior on Android 10 for apps that have not migrated to scoped storage B) To request permission to read external storage C) To force the app to use the old storage API on all Android versions D) To disable all external storage access Answer: A Explanation: The flag temporarily restores the pre-scoped storage model on Android 10 (API 29) for compatibility. Question 51. Which Android architecture component helps you to observe changes in a SQLite database without writing explicit queries? A) LiveData B) Room C) DataBinding D) WorkManager Answer: B Explanation: Room provides compile-time verification of SQLite queries and can return LiveData or Flow for automatic updates. Question 52. Which of the following is the correct way to start a foreground service on Android 9 (API 28) and higher? A) startService(intent) B) startForegroundService(intent) then call startForeground() inside the service C) bindService(intent, connection, BIND_AUTO_CREATE) D) startForeground(intent) Answer: B Explanation: startForegroundService() starts the service, which must call startForeground() within a few seconds. Question 53. In Android, which method is invoked when a user dismisses a dialog by tapping outside its window?

Ultimate Exam

B) It removes all activities above the target activity if it already exists in the back stack. C) It clears the entire back stack and launches the target activity as the only one. D) It has no effect on the back stack. Answer: B Explanation: CLEAR_TOP brings an existing instance to the front and destroys any activities above it. Question 57. Which of the following is a valid way to pass complex data (e.g., a custom object) between Activities? A) Put the object directly into the Intent extras using putExtra(String, Object) B) Serialize the object to JSON and pass the JSON string via Intent extras C) Use a static global variable to hold the object D) None of the above Answer: B Explanation: Parcelable or Serializable can be used; JSON string is a common workaround when the object isn’t Parcelable. Question 58. What does the android:exported attribute default to for Activities that contain an intent filter on Android 12 (API 31) and higher? A) true B) false C) It must be explicitly declared; otherwise the build fails. D) It inherits the value from the application tag. Answer: C Explanation: Starting with API 31, android:exported is mandatory for components with intent filters; lack of declaration causes a manifest merger error. Question 59. Which of the following methods is used to schedule periodic work that must run even if the device is idle? A) WorkManager.enqueuePeriodicWork()

Ultimate Exam

B) AlarmManager.setRepeating() C) JobScheduler.schedule() with setPeriodic() D) Handler.postDelayed() Answer: C Explanation: JobScheduler’s setPeriodic() creates a job that runs at defined intervals and respects Doze mode. Question 60. In Android, which attribute controls whether a view receives focus when navigating with a D-pad or keyboard? A) android:focusable B) android:clickable C) android:enabled D) android:visibility Answer: A Explanation: android:focusable="true" makes the view eligible for focus navigation. Question 61. Which of the following is the correct way to observe a LiveData object from a Fragment using viewLifecycleOwner? A) liveData.observe(this, Observer { … }) B) liveData.observe(viewLifecycleOwner, { … }) C) liveData.observe(getViewLifecycleOwner(), Observer { … }) D) liveData.observe(activity, Observer { … }) Answer: C Explanation: viewLifecycleOwner (or getViewLifecycleOwner()) ties observation to the Fragment’s view lifecycle. Question 62. Which of these Android libraries provides a lightweight alternative to Glide for image loading? A) Picasso B) Fresco