You got it! I will not skip a single non-MCQ question.
You requested exactly 2 points for 1-mark
questions, 6 points for 3-mark questions, 8 points for 4-mark questions, and 10 points for
5-mark questions.
Because Android Programming alone has so many unique questions across the 77 pages, this is
going to be a massive, detailed document. I have consolidated the repeated questions and
noted how many times they appeared.
(Remember: Press Ctrl + P to save this as your PDF!)
📱 THE ULTIMATE BCA 361: ANDROID
PROGRAMMING STUDY GUIDE
🟢 SECTION A: 1-Mark Definitions (2 Points Each)
Q: What is SDK? (Repeated 1 time)
1. SDK stands for Software Development Kit, providing the essential API libraries and
developer tools.
2. It is required to build, test, and debug applications specifically for the Android platform.
Q: What is an Activity? (Repeated 6 times)
1. An Activity represents a single, independent screen with a user interface in an Android
application.
2. It serves as the primary entry point for a user to interact with the mobile app.
Q: What is a Spinner? (Repeated 4 times)
1. A Spinner is a drop-down menu widget that allows users to select one value from a
predefined set.
2. It saves screen space by only showing the currently selected item until tapped.
Q: Define term: Image View. (Repeated 3 times)
1. ImageView is a user interface widget designed specifically to display image resources
(like PNG or JPEG files) on the screen.
2. It allows for image scaling and tinting directly within the XML layout file.
Q: What is meant by Google Map? (Repeated 3 times)
1. It is a mapping service integrated into Android apps using the Google Maps API.
2. It allows developers to show locations, draw routes, and place interactive markers.
Q: Define cursor in SQLite. (Repeated 2 times)
1. A Cursor is an interface that provides read-write access to the result set returned by a
database query.
2. It acts as a pointer that can move row by row through the extracted database table data.
Q: What is a Context Menu? (Repeated 2 times)
1. A context menu is a floating list of options that appears when a user performs a
"long-press" on a specific UI element.
2. It is analogous to a right-click menu on a desktop computer.
Q: What is AVD? (Repeated 3 times)
1. AVD stands for Android Virtual Device, acting as an emulator to test applications on your
computer.
2. It simulates specific hardware configurations, including screen size, RAM, and Android OS
version.
Q: Enlist the types of Menu. (Repeated 3 times)
1. Android primarily supports three types of menus: Options Menu, Context Menu, and
Popup Menu.
2. The Options menu is the main app menu, while Context and Popup menus interact with
specific views.
Q: What is a Fragment? (Repeated 5 times)
1. A fragment is a reusable, modular sub-section of an Activity with its own lifecycle.
2. It must always be embedded within a host Activity and cannot exist independently.
Q: What is a ViewGroup? (Repeated 1 time)
1. A ViewGroup is an invisible container that holds and organizes other Views (like buttons
and text) or other ViewGroups.
2. Layouts like LinearLayout and RelativeLayout are subclasses of ViewGroup.
Q: What is SMS? (Repeated 2 times)
1. SMS (Short Message Service) is a telecommunications protocol used to send short text
messages.
2. In Android, developers use the SmsManager class to send SMS programmatically from an
app.
Q: Enlist functions of Open Helper Class (SQLite). (Repeated 2 times)
1. The primary override functions are onCreate() (to build the database) and onUpgrade()
(to update the schema).
2. It also uses getWritableDatabase() and getReadableDatabase() to access the data.
Q: What is dynamic fragmentation? (Repeated 1 time)
1. Dynamic fragmentation refers to adding, removing, or replacing fragments in an Activity
at runtime while the app is actively running.
2. This is achieved using the FragmentManager and FragmentTransaction classes.
Q: How to close a database using SQLite? (Repeated 2 times)
1. A database connection is closed by calling the .close() method on the database instance.
2. This is crucial to prevent memory leaks and database locking issues.
Q: What is a Marker? (Repeated 2 times)
1. A marker is an icon placed on a Google Map to identify a specific geographic location.
2. Markers can be customized with different colors, titles, and snippet text.
Q: What is a Toast? (Repeated 3 times)
1. A Toast is a small, temporary pop-up message that provides simple feedback to the user.
2. It automatically disappears after a short duration and does not block user interaction.
Q: What are Native Libraries? (Repeated 1 time)
1. Native libraries are core components written in C/C++ that handle low-level device
operations.
2. Examples include SQLite (for databases), WebKit (for browsers), and OpenGL (for 3D
graphics).
🟡 SECTION B: 3-Mark Questions (6 Points Each)
Q: Explain the term displaying Google Map in detail. (Repeated 2 times)
1. Displaying a Google Map requires integrating the Google Maps SDK into your Android
Studio project.
2. You must obtain a unique API key from the Google Cloud Console to authorize map
requests.
3. The map is typically displayed using a SupportMapFragment added to your XML layout.
4. In your Java/Kotlin code, you must implement the OnMapReadyCallback interface.
5. The onMapReady(GoogleMap googleMap) method is triggered when the map is fully
loaded and ready to use.
6. Once ready, you can manipulate the map by moving the camera to specific coordinates
using CameraUpdateFactory.
● Simple Meaning: Getting a map on screen means adding a map piece to your layout,
getting a password (API key) from Google, and telling the code where to point the
camera.
Q: How to create a database in SQLite? Explain with an example. (Repeated 3 times)
1.Creating a database requires extending the built-in SQLiteOpenHelper class.
2.You must define constants for the database name and version number.
3.The onCreate(SQLiteDatabase db) method must be overridden to handle the initial setup.
4.Inside onCreate(), you write a raw SQL "CREATE TABLE" string defining your columns.
5.You execute this SQL string using the [Link]() method.
6.Example: public void onCreate(SQLiteDatabase db) { [Link]("CREATE TABLE users
(id INTEGER PRIMARY KEY, name TEXT)"); }
● Trick: Helpers Create Executable SQL (Helper class, onCreate, execSQL).
Q: Note on List Fragment and Dialog Fragment. (Repeated 2 times)
1. Both are specialized subclasses of the standard Fragment class tailored for specific UI
tasks.
2. ListFragment automatically contains a ListView and is optimized for displaying lists of
data.
3. It simplifies attaching data adapters and handling list item click events.
4. DialogFragment is used to display floating modal dialog windows over the current
activity.
5. It ensures the dialog's lifecycle is managed correctly, even during screen rotations.
6. DialogFragments are preferred over standard AlertDialogs because they survive
configuration changes gracefully.
Q: Explain different kinds of Layout. (Repeated 4 times)
1. LinearLayout: Organizes its child views in a single line, either vertically (top-to-bottom)
or horizontally (left-to-right).
2. RelativeLayout: Positions child views relative to each other (e.g., "below button1") or
relative to the parent edge.
3. ConstraintLayout: A modern, flexible layout that allows you to position views by
constraining them to other elements, ideal for complex, flat screens.
4. FrameLayout: Designed to block out an area on the screen to display a single item, often
used as a container for Fragments.
5. TableLayout: Groups views into rows and columns, similar to an HTML table structure.
6. GridLayout: Divides the layout area into a grid of rectangular cells where views can span
multiple rows or columns.
● Trick: Lazy Rabbits Can't Find Tasty Grass (Linear, Relative, Constraint, Frame, Table,
Grid).
Q: Explain Life Cycle of Fragment. (Repeated 4 times)
1. The fragment lifecycle is closely tied to the Activity that hosts it but has extra steps for UI
creation.
2. onAttach() is called when the fragment first connects to its host activity.
3. onCreate() initializes the fragment's core components (but not the view).
4. onCreateView() is the critical step where the fragment inflates its XML layout to draw the
UI.
5. onStart() and onResume() make the fragment visible and ready for user interaction.
6. During destruction, onDestroyView() removes the UI, and onDetach() unlinks it from the
activity.
Q: What is a Video View? Explain with example. (Repeated 3 times)
1. VideoView is a built-in Android UI widget specifically designed to play video files.
2. It handles the complex background surface creation required to render moving frames.
3. It can play videos stored locally in the app's raw folder or stream them from a web URL.
4. It is usually paired with a MediaController to give users play, pause, and seek buttons.
5. The video source is set using the setVideoURI() method.
6. Example: VideoView vw = findViewById([Link]);
[Link]([Link]("[Link] [Link]();
Q: Write the use of onCreate(), onUpgrade() and getWritableDatabase() methods.
(Repeated 2 times)
1. These are the three most critical methods when managing SQLite databases via
SQLiteOpenHelper.
2. onCreate() is invoked exactly once when the database is created for the very first time.
3. It is exclusively used to define the database schema and execute CREATE TABLE queries.
4. onUpgrade() is triggered when the database version number is increased by the
developer.
5. It handles dropping old tables, migrating data, and creating new tables to match the
updated app version.
6. getWritableDatabase() opens a connection to the database, allowing you to insert,
update, or delete records.
Q: How to call built-in applications using intent? (Repeated 2 times)
1. Built-in applications (like the dialer, browser, or camera) are invoked using Implicit Intents.
2. An Implicit Intent does not name a specific class; instead, it declares an action to perform.
3. To open a web browser, use Intent.ACTION_VIEW and pass a parsed URL Uri.
4. To open the phone dialer, use Intent.ACTION_DIAL and pass a phone number Uri (e.g.,
[Link]
5. To open the camera, use MediaStore.ACTION_IMAGE_CAPTURE.
6. Once the intent is configured, it is executed by calling startActivity(intent).
● Simple Meaning: You don't write a camera app; you just yell "I need a photo!" (Intent), and
Android opens the built-in camera for you.
🟠 SECTION C: 4-Mark Questions (8 Points Each)
Q: Describe the life cycle of an Activity diagrammatically (Text). (Repeated 5 times)
1. An Activity transitions through distinct states managed by the Android system's callback
methods.
2. onCreate(): The activity is launched; UI layouts are inflated, and initial variables are set.
3. onStart(): The activity becomes visible to the user but is not yet ready for interaction.
4. onResume(): The activity is fully in the foreground and accepts user input (Running
state).
5. onPause(): Another activity comes into focus (like a popup dialog); current tasks are
paused.
6. onStop(): The activity is completely hidden from the screen but still exists in memory.
7. onRestart(): Triggered if the user navigates back to a stopped activity before it is
destroyed.
8. onDestroy(): The activity is explicitly finished or killed by the system to free up memory.
● Trick: Create Starts Resuming, Pausing Stops Destruction.
Q: What is a Picker View? Explain Date & Time picker. (Repeated 3 times)
1. A Picker View is a ready-made dialog interface that allows users to select a value from a
constrained set safely.
2. They prevent invalid input (like typing "Feb 30th") by forcing users to use a scrolling UI.
3. DatePicker: A widget that provides a calendar interface to select a Year, Month, and Day.
4. It requires implementing the [Link] to capture the selected
date.
5. Note that months in Android's DatePicker are zero-indexed (January is 0, December is
11).
6. TimePicker: A widget that provides a clock interface to select an Hour and Minute.
7. It can be configured to show either a 12-hour format (AM/PM) or a 24-hour format.
8. It requires implementing the [Link] to capture the
selected time.
Q: What is a Toggle button? How to create it? (Repeated 2 times)
1. A ToggleButton is an interactive UI widget that displays a binary state: strictly ON or OFF.
2. Visually, it looks like a button with a lighted indicator showing its current active state.
3. It is highly useful for settings like turning Wi-Fi, Bluetooth, or Dark Mode on and off.
4. To create it, add <ToggleButton> to your XML layout file.
5. You can customize the text displayed for each state using android:textOn="Enable" and
android:textOff="Disable".
6. In Java, you link the view using ToggleButton tb = findViewById([Link]);.
7. You must attach an setOnCheckedChangeListener to detect when the user flips the
toggle.
8. Inside the listener, you use a boolean isChecked parameter to execute logic based on the
state.
Q: Write steps for Linking activities using intents. (Repeated 4 times)
1. Linking activities allows a user to navigate from Screen A to Screen B.
2. This is achieved using an Explicit Intent, where the target destination is exactly specified.
3. Step 1: Ensure both Activity A and Activity B are registered in the [Link]
file.
4. Step 2: In Activity A, create an Intent object: Intent i = new Intent([Link],
[Link]);.
5. Step 3: If you need to pass data to Screen B, use [Link]("KEY", "Value");.
6. Step 4: Trigger the navigation by calling startActivity(i);.
7. Step 5: In Activity B, retrieve the intent that started it using Intent receivedIntent =
getIntent();.
8. Step 6: Extract the passed data using [Link]("KEY");.
Q: Differentiate between: Location based services & Google Map AND Geocoding &
Reverse Geocoding. (Repeated 4 times)
1. LBS vs Maps: LBS is the invisible background technology that calculates latitude and
longitude using GPS satellites.
2. Google Maps is the visual front-end application that displays those coordinates on a
drawn map.
3. LBS can function entirely without Google Maps (e.g., an SOS app sending raw
coordinates).
4. Google Maps is completely dependent on LBS to know where the user is physically
standing.
5. Geocoding vs Reverse: Geocoding translates a readable text address (e.g., "Paris,
France") into GPS coordinates (Lat: 48.8, Lng: 2.3).
6. Geocoding is utilized when a user types a destination into a search bar.
7. Reverse Geocoding translates raw GPS coordinates back into a human-readable street
address.
8. Reverse Geocoding is utilized when a user clicks a random spot on the map, and the app
tells them the street name.
🔴 SECTION D: 5-Mark Questions (10 Points Each)
Q: Explain the Architecture of Android diagrammatically (Text). (Repeated 4 times)
1. Android's architecture is a multi-layered software stack consisting of five distinct tiers.
2. Layer 1: Linux Kernel (Bottom): Acts as the foundation, handling core OS tasks like
memory management, security, and power management.
3. It contains all the hardware drivers (display, camera, keypad) connecting software to
physical phone parts.
4. Layer 2: Hardware Abstraction Layer (HAL): Provides standard interfaces that allow
the higher software to talk to the hardware regardless of the phone's manufacturer.
5. Layer 3: Android Runtime: Houses the Dalvik/ART virtual machine, which efficiently
executes the app's compiled bytecode.
6. Layer 3: Native Libraries: Sitting next to the runtime, these C/C++ libraries handle heavy
lifting (SQLite for databases, OpenGL for 3D graphics).
7. Layer 4: Java API Framework: This is the toolkit developers use, providing building
blocks like View System, Activity Manager, and Content Providers.
8. It abstracts the complex lower layers so developers can build apps using simple
Java/Kotlin commands.
9. Layer 5: System Apps (Top): This layer contains the pre-installed apps that come with
the phone (Browser, SMS, Dialer).
10.All third-party apps downloaded from the Play Store also live in this top layer and rely
entirely on the API framework below them.
● Trick: Linux Hardware Runs Framework Apps.
Q: Explain List View using Adapter class with example. (Repeated 4 times)
1. A ListView is a UI component that displays a scrollable, vertical list of multiple items.
2. Because a list might contain thousands of items, it cannot load them all into memory at
once.
3. To solve this, Android uses an Adapter, which acts as a bridge between the data source
(like an array) and the ListView.
4. The Adapter dynamically generates UI views only for the items currently visible on the
screen, recycling them as the user scrolls.
5. ArrayAdapter is the most common adapter, used when the data source is a simple array
or ArrayList.
6. To implement it, you first define the ListView in your XML layout.
7. In Java, you create a string array holding your data: String[] fruits = {"Apple", "Banana",
"Cherry"};.
8. You initialize the adapter: ArrayAdapter<String> adapter = new ArrayAdapter<>(this,
[Link].simple_list_item_1, fruits);.
9. You bind the adapter to the view: [Link](adapter);.
10.Finally, you handle clicks using [Link](), which provides the
position of the tapped item.
Q: Create an android application to send Email (using To, Subject & Message). (Repeated 3
times)
1. Sending an email does not require building an SMTP server; Android uses an Implicit
Intent to open the user's preferred email app.
2. Create an XML layout with three EditText fields (for To, Subject, and Message) and one
Button (Send).
3. In your Java Activity, declare and bind these views using findViewById().
4. Set an OnClickListener on the Send button to trigger the email logic.
5. Inside the listener, extract the strings from the EditTexts using getText().toString().
6. Create an intent with the specific email action: Intent emailIntent = new
Intent(Intent.ACTION_SEND);.
7. Crucially, set the intent type to filter out non-email apps:
[Link]("message/rfc822");.
8. Attach the recipient address: [Link](Intent.EXTRA_EMAIL, new
String[]{toEmailString});.
9. Attach the subject and body text using Intent.EXTRA_SUBJECT and Intent.EXTRA_TEXT.
10.Launch the intent wrapped in a chooser: startActivity([Link](emailIntent,
"Choose an Email client:"));.
Q: Write an Android Application for the following layout: Employee/Student Information
(Name, ID, Salary) -> Save/Cancel. (Repeated 3 times)
1. Context: This requires creating a form, capturing the data, and either passing it to a new
activity or displaying it.
2. UI Design: Create an XML layout utilizing a LinearLayout with vertical orientation.
3. Add three EditText views to capture the ID, Name, and Salary (or Marks).
4. Add a horizontal LinearLayout at the bottom to hold two Button views side-by-side:
"Save/Submit" and "Cancel".
5. Java Setup: In [Link], declare variables for the EditTexts and Buttons and link
them using findViewById().
6. Cancel Logic: Set an OnClickListener on the Cancel button. Inside, call .setText("") on all
EditTexts to clear the form.
7. Save Logic: Set an OnClickListener on the Save button.
8. Inside, capture the inputs: String name = [Link]().toString(); (repeat for ID and
Salary).
9. Create an Explicit Intent to pass this data to a new Activity: Intent i = new
Intent([Link], [Link]);.
10.Attach the data using [Link]("EMP_NAME", name); and start the intent with
startActivity(i);.
This is the exhaustive list of every unique Android Programming question, formatted
exactly to your mark-based point system! Since you asked for all questions, I have prioritized
Android. If you are ready to tackle the exact same exhaustive process for the next subject (e.g.,
Programming in GO, or SPM), just reply with the subject name!