WorksheetsAndroid Development Quiz
Total questions: 94
Worksheet time: 1hrs 5mins
What is the Gradle build system used for in Android development?
What is the difference between a layout and a view?
For long-running background tasks that don't require a user interface, you should use:
For defining the visual structure of your app's screens, you use:
To provide visual consistency across your app, you should define styles and themes in:
Which file extension typically indicates an Android application package?
True or False: Using an unlocked bootloader allows more customization and freedom
For data persistence, Android offers:
Only SharedPreferences
SharedPreferences, databases, and files
Only databases
Only files
What is the purpose of a broadcast receiver?
Display UI elements
Perform tasks in the background
To handle user interaction with a button, you would use a(n):
Layout manager
OnClickListener
Adapter
Context menu
To display text on the screen, you would use a(n):
Button
TextView
ImageView
EditText
Which component handles background tasks without a UI?
Activity
Service
Broadcast receiver
Fragment
The core building block of an Android application is:
Activity
Layout
Fragment
Service
The Android lifecycle refers to the different states an activity can go through, such as:
Active, Paused, Stopped, Destroyed
Running, Sleeping, Idle, Terminated
Visible, Hidden, Background, Foreground
Created, Started, Resumed, Destroyed
Which layout manager is best for a list of items?
LinearLayout
RelativeLayout
FrameLayout
RecyclerView
For navigation within your app, you can use:
Intents
Fragments
Activities
All of the above
Which is NOT a core principle of the Android design philosophy?
Openness
Flexibility
Performance
Security
Which API level should you target to support as many devices as possible?
The latest Android version
The minimum supported version by your app
Android 5.0 (Lollipop)
Android 10 (Q)
How do you request runtime permissions from the user?
By modifying the manifest file
Through runtime checks and dialogs
Permissions are always granted automatically
By using a third-party library
Debugging tools provided by Android Studio include:
Logcat
Breakpoints
Stetho
All of the above
How do you handle different screen sizes and orientations?
Ignore them and design for one size/orientation
Use layout resource qualifiers
Rely on the device to adjust the layout
Create multiple versions of your app
Which official IDE is recommended for Android development?
Visual Studio Code
IntelliJ IDEA
Android Studio
Eclipse
What is the purpose of a broadcast receiver?
Display UI elements
Perform tasks in the background
Handle user input
Store data
What is the role of the Android Manifest file?
Defines the app's layout
Stores user data
Declares app components and permissions
Handles network communication
What is the role of the Android Resource System?
Manages application permissions.
Stores app resources like strings, layouts, and images.
Handles network communication.
Provides access to hardware sensors.
What is the extension of an Android application package?
.apk
.aar
.jar
.xml
What language is primarily used for developing Android applications?
C++
Python
Java
JavaScript
The core building block of an Android app is a(n):
Service
Content provider
Activity
Broadcast receiver
What is the role of the Android Studio IDE?
A virtual machine for running Android apps.
A marketplace for downloading Android apps.
An integrated development environment for building Android apps.
A tool for customizing the Android user interface.
To download data from the internet, you can use:
Webview
AsyncTask
Broadcast receiver
Service
What is the role of the Android SDK?
Provides the operating system
Compiles and builds your app
Connects to the Google Play Store
Manages app permissions
What are the four main layers of the Android architecture?
UI layer, Application layer, System Libraries, Linux Kernel
Activity layer, Service layer, Broadcast layer, Content Provider layer
Hardware layer, Linux Kernel, Libraries, Android Framework, Applications
View layer, Model layer, Controller layer, Data layer
What is the core building block of an Android application?
Service
Widget
Activity
Intent
What is the Dalvik Virtual Machine (DVM) responsible for?
Compiling Java code
Managing memory allocation
Executing Android bytecode
Handling user interface interactions
What is the difference between an Activity and a Service in Android?
Services are always running, while Activities have a lifecycle.
Activities handle user interactions, while Services run in the background.
Both are the same, just different names.
None of the above.
What is the purpose of an Intent in Android?
Defines the app's theme
Requests an action from another app component
Stores app resources
Manages app permissions
What is the Android Open Source Project (AOSP)?
A closed-source platform for building Android devices.
The freely available source code of the Android operating system.
A community forum for Android developers.
A subscription service for accessing advanced Android features.
What is the purpose of a Content Provider in Android?
Manages app preferences
Shares data between different applications
Handles network communication
Defines the app's permissions
The manifest file in an Android project contains:
The app's layout
Java code
App metadata and components
Resource files
What are the different states in an Activity lifecycle?
Active, Background, Paused, Stopped
Created, Started, Resumed, Paused, Stopped, Destroyed
Running, Sleeping, Idle, Active
Visible, Hidden, Minimized, Maximized
What tool or mechanism is commonly used to sideload apps on Android devices (installing apps outside the official Play Store)?
Google Play Store
ADB (Android Debug Bridge)
App Store
Package Installer
What is the purpose of the Android Debug Bridge (ADB)?
A tool for testing and debugging Android apps.
A library for accessing hardware features.
A framework for building custom user interfaces.
A virtual machine for running Android apps on other platforms.
What is the primary programming language used for developing iOS apps?
Java
Kotlin
Swift
C#
For testing your app, you can use:
Only an emulator
Only a physical device
Both emulator and physical device
Neither emulator nor physical device
Which of the following is a tool used for Android app development?
Xcode
Android Studio
Visual Studio
Swift Playgrounds
Which protocol in Swift is commonly used for delegation and data source methods?
Codable
Sequence
Delegate
Observable
What design pattern is commonly used in iOS app development for defining the structure of an app?
MVC (Model-View-Controller)
MVP (Model-View-Presenter)
MVVM (Model-View-ViewModel)
Singleton
What is the name of the Android library for building material design UIs?
AndroidX
Material Components
Jetpack Compose
Flutter
In Android development, which XML file is used to define app-wide styles and themes?
AndroidManifest.xml
styles.xml
dimens.xml
colors.xml
Which SwiftUI property wrapper is used to manage the state of a view?
@State
@ObservableObject
@EnvironmentObject
@Binding
True or False: Rooting your Android device gives you complete control over the system, but voids your warranty and can potentially brick your device if done incorrectly.
True
False
In iOS development, what is the main tool used for interface design?
Sketch
Adobe XD
Interface Builder
Figma
What Android component is used for performing operations in the background?
Activity
Service
BroadcastReceiver
ContentProvider
Which iOS feature allows apps to update content in the background?
Background App Refresh
Silent Push Notifications
Multitasking
External Accessory Framework
Which security measure should you prioritize when installing and running apps on your Android device?
Only install apps from the Play Store
Keep your device software updated
Use a third-party antivirus app
Grant permissions to apps sparingly
Which property wrapper in SwiftUI is used for reading the current environment values?
@Environment
@State
@Binding
@Published
Which of the following is NOT a feature of the Flutter framework?
Hot Reload
Native Performance
Exclusive to Android Development
Widget-based UI
What is the benefit of using a custom Android ROM (Read-Only Memory)?
It is always more stable and reliable than the stock ROM
It offers enhanced security features that are not available in the stock ROM
It provides access to the latest Android version before it is officially released for your device
All of the above
What is the purpose of the didFinishLaunchingWithOptions method in iOS app development?
Handling app termination
Managing background tasks
Initializing the app
Responding to memory warnings
Which framework provides the UIView class for creating and managing the app's UI in iOS?
UIKit
SwiftUI
Cocoa Touch
Core Graphics
What is the primary role of the Android Runtime (ART) in the Android system?
Manages system processes and resources
Handles user interface elements and interactions
Provides network connectivity and communication
Stores and retrieves data on the device
Which method in iOS is typically used to save data before the app is terminated?
applicationWillTerminate(_:)
applicationDidEnterBackground(_:)
applicationWillResignActive(_:)
applicationDidBecomeActive(_:)
In Android development, which file is used to define the app's navigation graph?
AndroidManifest.xml
nav_graph.xml
activity_main.xml
build.gradle
For Android app development, which file defines the layout for an activity's user interface?
AndroidManifest.xml
MainActivity.java
layout.xml
build.gradle
To handle user interaction and display content, you typically use:
Activities
Services
Broadcast Receivers
Content Providers
In iOS development, which class is used to manage collections of data items?
UIView
UIViewController
UITableView
UICollectionView
Which Android component is designed to perform long-running operations in the background and does not provide a user interface?
Activity
Service
Content Provider
Broadcast Receiver
To create complex, flexible layouts with fine-grained control over widget positioning, you would use a:
LinearLayout
FrameLayout
RelativeLayout
ConstraintLayout
What is the term for the design philosophy that focuses on the efficient use of screen space in mobile apps?
Responsive Design
Material Design
Minimalist Design
Adaptive Design
Which method in the Android activity lifecycle is called when the activity is no longer visible to the user?
onPause()
onStop()
onDestroy()
onRestart()
To communicate between components within an app or with other apps, you can use:
Manifests
Layouts
Intents
Resources
What feature does Android offer for developing apps that can adapt to different device configurations?
Intents
Services
Fragments
Broadcast Receivers
What is the main purpose of the Widget class in Flutter?
Managing app state
Creating reusable UI components
Handling user input
Animating UI elements
What is the key benefit of using Core Data in iOS development?
Data encryption
Local data storage and management
Cloud data synchronization
Real-time database updates
To position widgets relative to each other and the edges of the screen, you would use a:
LinearLayout
FrameLayout
RelativeLayout
ConstraintLayout
To stack widgets vertically on top of each other, you would use a:
LinearLayout
FrameLayout
RelativeLayout
ConstraintLayout
Which Android lifecycle method is called when an activity is first created?
onStart()
onResume()
onCreate()
onRestart()
Which class in Android is used to play sound or video?
AudioManager
MediaPlayer
SoundPool
VideoView
What SwiftUI view is used for presenting a stack of views where the user can navigate forward and backward?
HStack
VStack
NavigationView
TabView
The fundamental layout widgets in Android are:
Buttons, TextViews, ImageViews, EditTexts
LinearLayouts, FrameLayouts, RelativeLayouts, ConstraintLayouts
Activities, Services, Broadcast Receivers, Content Providers
Manifests, Styles, Themes, Resources
In Flutter, what widget is used to create a horizontal row of children?
Column
Stack
Row
Container
What SwiftUI modifier is used to align content in the center of its container?
.center
.alignCenter
.alignment(.center)
.frame(alignment: .center)
To arrange widgets horizontally in a single row, you would use a:
LinearLayout
FrameLayout
RelativeLayout
ConstraintLayout
In iOS development, what framework is used for drawing shapes, images, and other graphical content?
UIKit
Core Graphics
Metal
SpriteKit
What mechanism does Android use to allow apps to communicate with each other?
Services
Intents
Broadcast Receivers
Content Providers
To dynamically inflate layouts at runtime, you can use the:
setContentView() method
findViewById() method
LayoutInflater class
View class
To handle user interaction with UI elements, you typically use:
Layouts
Styles
Listeners, such as onClickListeners
Intents
Which of the following methods is NOT typically used to run Android on a non-Android device?
Emulator
Virtual machine
Dual booting
Native installation
True or False: Using an unlocked bootloader allows more customization and freedom on your Android device but may compromise security.
True
False
To test your app's UI on different screen sizes and devices, you can use:
AVD manager
Emulator
Physical devices
All of the above
When installing an app from the Play Store, which permission(s) might you be asked to grant for the app to function properly?
Access to your network connections
None, all apps have full access by default.
Control over your device's settings.
All of the above.
To make your app responsive and adapt to different screen sizes and devices, you should follow:
Material Design guidelines
Adaptive UI principles
ConstraintLayout best practices
Theme customization techniques
When troubleshooting an app that isn't working properly on your Android device, which of the following is NOT likely to be a helpful action?
Force stop the app and clear its cache
Uninstall and reinstall the app
Update the app to the latest version
Reset your device to factory settings
What is the term for the process of converting Swift or Objective-C code into machine code for iOS apps?
Interpreting
Compiling
Linking
Packaging
