NEW
Font size
WorksheetsFINAL EXAMINATION | CTCC0603
Total questions: 60
Worksheet time: 30mins
What does an Activity represent in an Android application?
A background process
A single screen or window for user interaction
The entire application
A floating database
The first screen a user sees when opening an Android app is typically called:
Launcher Activity
Start Activity
Main Activity
Root Activity
Which file usually defines the Activity’s layout in Android?
Java File
XML File
Manifest File
.apk File
An Activity Java class usually extends which parent class?
ActivityCreator
AppCompatActivity
MainIntent
XMLInflater
Which method is responsible for setting the layout view of an Activity?
onRun()
setLayout()
onCreate()
createUI()
To make an Activity part of the application, it must be declared in:
build.gradle
Java class
Android Manifest
App Settings
What is an Intent in Android?
A UI element
A type of database
A message requesting an action from another component
A background service
Which type of intent specifies the exact activity to start?
Explicit
Implicit
Direct
Internal
Which type of Intent asks the system to choose an application that can handle the action?
Direct Intent
Internal Intent
Explicit Intent
Implicit Intent
What method is used to start a new Activity using an Intent?
runActivity()
startIntent()
startActivity()
openActivity()
Extras sent with Intent are stored as:
Key-value pairs inside a Bundle
Only integers
File attachments
URI data only
Which method retrieves a single integer extra from an Intent?
getIntentData()
getIntExtra()
getIntValue()
getExtraBundle()
Which function allows an Activity to return data back to the caller?
startReturning()
startActivity()
startActivityForResult()
ActivityReturn()
Which callback receives the result sent back from another Activity?
onStart()
onActivityResult()
onResponse()
onReturnResult()
When the Back button is pressed, what Android mechanism determines which Activity resumes?
Result Code
Activity Queue
Activity Stack (Back Stack)
Manifest Listing
What is the basic building block for all Android UI components?
Activity
Fragment
View
Layout
Which UI element allows free-form text input from the user?
Spinner
EditText
RadioButton
CheckBox
The view that currently receives user input is said to have:
Touch control
Focus
Gesture
Interaction
Which of the following allows selecting only one choice at a time?
CheckBoxes
ToggleButtons
RadioButtons in a RadioGroup
Spinners
Which UI element is typically used for a primary action, such as adding a new item?
ToggleButton
FloatingActionButton (FAB)
RadioButton
SeekBar
Which input type is used for passwords in EditText?
textAutoCorrect
textShortMessage
textPassword
textEmailAddress
A button click can be handled in code using:
requestFocus()
addOnClick()
setOnClickListener()
onTouchEvent()
Which input control displays options in a dropdown list?
Spinner
CheckBox
ToggleButton
EditText
A dialog that interrupts the flow and requires user interaction to continue is called:
Action Bar
Snackbar
AlertDialog
PopUpButton
Which class is used to help detect common touch gestures?
MotionEventHelper
GestureManager
GestureDetectorCompat
TouchInterpreter
What Android component acts like a mini-activity inside an activity?
ViewHolder
Fragment
Menu
Dialog
Which allows selecting multiple independent choices?
RadioButtons
Spinner
Toggle
CheckBoxes
Which property can be used in XML to assign the next view to receive focus?
android:focusOn
android:focusable
android:nextFocusDown
android:autoFocus
Which input control typically has two states: ON and OFF?
CheckBox
ToggleButton
EditText
Spinner
Which of the following gestures is recognized by Android touch system?
Hover-click
Long touch
Eye tracking
Voice swipe
Which Android storage option is best for storing private primitive data in key-value pairs?
SharedPreferences
Internal storage files
SQLite database
External storage
Which storage option stores data privately inside the internal filesystem of the app?
Internal Storage
External Storage
Firebase
Content Providers
Which storage location is represented as removable media like an SD card?
Internal Storage
Local Cache Storage
External Storage
System Partition
Which method of storage provides structured private database support to apps?
Shared Preferences
Indexed Storage
SQLite Database
Local Filesystem
Which Android component allows storing data privately and sharing it publicly if needed?
Firebase Database
Content Providers
Shared Preferences
SQLite Database
External storage is best used when storing files that:
Must remain private to the app
Should only be used by system processes
Should be shared with other apps or users
Need no permissions
What permission was previously required to read files outside app-specific external storage directories?
MANAGE_ALL_STORAGE
READ_MEDIA
READ_EXTERNAL_STORAGE
ACCESS_FINE_STORAGE
Which permission allowed apps to write to external storage files in older Android versions?
WRITE_EXTERNAL_STORAGE
READ_FILE_STORAGE
ACCESS_WRITE_FILES
MANAGE_USER_STORAGE
Scoped Storage was introduced in Android version:
Android 8 (API 26)
Android 9 (API 28)
Android 10 (API 29)
Android 11 (API 30)
What is the benefit of scoped storage?
Unlimited access to device storage
Better control over user data and less clutter
Faster database transactions
Removes need for permissions
Which permission newly introduced in Android 11 (API 30) grants access to files outside MediaStore?
FULL_STORAGE_ACCESS
MANAGE_EXTERNAL_STORAGE
STORAGE_WRITE_ALL
ACCESS_ALL_FILES
Which question should a developer ask when selecting a storage method?
What is the user’s location?
How much space is needed?
How many users installed the app?
What is displayed on screen?
Storing user files that can be copied off the device easily should be placed in:
Private App Folder
Public External Directory
Virtual Memory
Local Cache Folder
Network connection storage allows developers to store data:
Only inside app sandbox
On their own server via the internet
Only using SQLite
Only on external SD card
Firebase Realtime Database provides:
SQL-based structured tables
Local-only access
Real-time NoSQL cloud data sync
No internet requirement
What type of database does Android provide to handle local data storage efficiently?
MySQL
SQL Server
SQLite
Firebase
SQLite is best suited for Android apps that:
Always require internet connection
Only store data on remote servers
Need to store data locally on the device
Do not store data at all
CRUD in SQLite stands for:
Copy, Restore, Update, Download
Create, Read, Update, Delete
Connect, Run, Upload, Deliver
Compile, Read, Upload, Debug
How is data arranged inside an SQLite database?
In documents
In folders
In tables similar to a spreadsheet
In photo-like tiles
Which of the following describes SQLite?
Cloud-hosted database
Open-source and built into Android
Requires external server setup
Not suitable for CRUD operations
Which method returns the number of rows in a Cursor?
getCount()
getPosition()
isClosed()
getColumnNames()
Which method is used to get the index of a column by its name?
getColumn()
getColumnIndex()
getColumnName()
getColumnCount()
The return type of the method isClosed() is:
int
String
boolean
void
Which method returns the current position of the Cursor in the table?
getPosition()
getCount()
getColumnCount()
getColumnNames()
Which of the following is NOT an example of CRUD operation?
Insert new data into a table
Display records from the table
Remove records
Change the Android theme
Which SQL operation corresponds to retrieving data?
CREATE
SELECT
DELETE
UPDATE
SQLite is most ideal for apps where:
Data is only stored online
Data storage is unnecessary
Local and lightweight storage is required
Maximum storage across network is required
Sending and saving data in SQLite does not require:
Internet connection
Database table creation
CRUD operations
Data types
Which method retrieves the names of all columns in the table?
getColumnIndex()
getCount()
getColumnNames()
getPosition()
Before choosing database storage type, a developer should consider:
Device wallpaper
Available network bandwidth
Whether data must be retrieved and stored locally
Number of screens in the app
