MCQs / Computer Science / Android OS: Architecture, Framework and Application Development
Android OS: Architecture, Framework and Application Development MCQs — Computer Science 53 multiple-choice questions on Android OS: Architecture, Framework and Application Development from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.
1. Which Jetpack library provides an SQLite object-mapping database? AppCompat Room Navigation WorkManager Answer: B) Room
Explanation: Room is an abstraction layer over SQLite.
Discuss this question
2. The first commercial Android phone was the: Nexus One iPhone 3G HTC Dream (T-Mobile G1) Samsung Galaxy S Answer: C) HTC Dream (T-Mobile G1)
Explanation: The HTC Dream/T-Mobile G1 launched in 2008 with Android 1.0.
Discuss this question
3. Dalvik primarily used which compilation technique? Just-In-Time (JIT) Interpretation of source code Ahead-Of-Time (AOT) only Native C compilation Answer: A) Just-In-Time (JIT)
Explanation: Dalvik compiled bytecode to machine code at run time using JIT.
Discuss this question
4. When a dialog partially covers an activity, the activity goes to: onDestroy() onCreate() onPause() onRestart() Answer: C) onPause()
Explanation: Losing focus while still partly visible triggers onPause().
Discuss this question
5. Material Design and ART as the default runtime came with Android: 10 5.0 Lollipop 4.0 7.0 Nougat Answer: B) 5.0 Lollipop
Explanation: Lollipop (API 21) introduced Material Design and made ART the default.
Discuss this question
6. Before an APK can be installed it must be: Uploaded to Play Converted to IPA Digitally signed Zipped twice Answer: C) Digitally signed
Explanation: Android only installs signed APKs (debug or release key).
Discuss this question
7. Music that keeps playing after you leave the app is usually run by a: Service Content Provider Fragment Toast Answer: A) Service
Explanation: Services perform long-running work without a UI.
Discuss this question
8. The build system used to compile and package Android apps is: CMake only Ant Xcode build Gradle (with the Android Gradle Plugin) Answer: D) Gradle (with the Android Gradle Plugin)
Explanation: Gradle with AGP builds Android apps.
Discuss this question
9. What is an API level? An integer that identifies the framework API version of an Android release The battery level The screen density The number of apps installed Answer: A) An integer that identifies the framework API version of an Android release
Explanation: Each Android version has an API level, e.g. Android 14 = API 34.
Discuss this question
10. Activities are kept in the back stack in which order? Random FIFO (queue) LIFO (stack) Alphabetical Answer: C) LIFO (stack)
Explanation: The back stack is last-in, first-out.
Discuss this question
11. Jetpack Compose is: A build tool An emulator A database library A modern declarative UI toolkit in Kotlin Answer: D) A modern declarative UI toolkit in Kotlin
Explanation: Compose builds UI with Kotlin functions instead of XML layouts.
Discuss this question
12. The four main Android application components are: Activity, Fragment, View, Layout Activity, Service, Broadcast Receiver, Content Provider Intent, Bundle, Context, Manifest Button, TextView, EditText, Toast Answer: B) Activity, Service, Broadcast Receiver, Content Provider
Explanation: These four components are the building blocks declared in the manifest.
Discuss this question
13. targetSdk indicates: The Android version the app has been designed and tested for The number of activities The oldest Android version supported The SDK used by the emulator only Answer: A) The Android version the app has been designed and tested for
Explanation: targetSdk tells the system which behaviours the app expects; Play sets minimum targets.
Discuss this question
14. Releasing heavy resources when the activity is no longer visible should be done in: onStop() onRestart() onCreate() onStart() Answer: A) onStop()
Explanation: onStop() is called when the activity is not visible.
Discuss this question
15. When the user presses Home, the activity's callbacks are: onRestart() then onStart() onDestroy() only onCreate() then onResume() onPause() then onStop() Answer: D) onPause() then onStop()
Explanation: The activity becomes invisible: onPause() then onStop().
Discuss this question
16. Which framework service shows alerts in the status bar? Resource Manager Package Manager Content Provider Notification Manager Answer: D) Notification Manager
Explanation: The Notification Manager displays notifications.
Discuss this question
17. Which layer contains the Phone, Contacts and Camera apps? Native libraries Kernel HAL Applications layer Answer: D) Applications layer
Explanation: System and user apps sit at the top of the stack.
Discuss this question
18. Which tool converts Java bytecode into DEX for release builds and also shrinks code? adb D8/R8 javac AAPT2 Answer: B) D8/R8
Explanation: D8 dexes the bytecode and R8 shrinks, optimises and obfuscates it.
Discuss this question
19. The object used to start activities and services is a/an: Intent Bundle Adapter Cursor Answer: A) Intent
Explanation: Intents are messages that request an action from another component.
Discuss this question
20. Which component responds to system events such as "battery low" or "boot completed"? Activity Service Broadcast Receiver View Answer: C) Broadcast Receiver
Explanation: Broadcast receivers listen for system or app broadcasts.
Discuss this question
21. The Android runtime used from Android 5.0 onward is: ART Dalvik JVM HotSpot V8 Answer: A) ART
Explanation: ART replaced Dalvik as the default runtime in Lollipop.
Discuss this question
22. Pressing the Back button on the top activity normally results in: onRestart() onPause() only onPause(), onStop(), onDestroy() onResume() Answer: C) onPause(), onStop(), onDestroy()
Explanation: Back finishes the activity, so it is paused, stopped and destroyed.
Discuss this question
23. Fragments and the Action Bar were introduced in Android 3.0, named: Honeycomb Gingerbread Oreo Froyo Answer: A) Honeycomb
Explanation: Honeycomb (API 11) was designed for tablets and added Fragments and the Action Bar.
Discuss this question
24. In which method should setContentView() normally be called? onDestroy() onResume() onCreate() onPause() Answer: C) onCreate()
Explanation: The layout is set once in onCreate().
Discuss this question
25. Which framework component manages activity lifecycles and the back stack? Window Manager Package Manager Telephony Manager Activity Manager Answer: D) Activity Manager
Explanation: The Activity Manager controls activity lifecycles and navigation stack.
Discuss this question
Page 1 of 3 Next
Practise Android OS: Architecture, Framework and Application Development MCQs
More Computer Science chapters