0% found this document useful (0 votes)
27 views3 pages

Mobile Assignment

Basics of mobile assignment

Uploaded by

azlaank1284
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Mobile Assignment

Basics of mobile assignment

Uploaded by

azlaank1284
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Discuss how an Android program will execute

An Android program begins with development in Android Studio, where code is written in
Java, Kotlin, or C++. This code is compiled into Java bytecode and then converted into
DEX (Dalvik Executable) files for the Android platform. The compiled code, along with
resources (images, layouts) and metadata, is packaged into an APK (Android Package)
file. When the APK is installed on a device, the Android system uses a Zygote process to
quickly create a new instance of the app's process. The app's main thread then initializes
components like Activities and Services. The Activity lifecycle methods, such as
onCreate(), onStart(), and onResume(), manage the app's state and interactions with
the user. The Android Runtime (ART) manages memory, performs garbage collection, and
optimizes performance. It handles the app's interaction with the device's hardware and
system services, ensuring efficient execution and resource management throughout the
app's lifecycle.

2. Explain RadioButton widget

A RadioButton is a UI widget that allows users to choose one option from a group of
mutually exclusive options. It is typically used within a RadioGroup, which ensures that only
one radio button in the group can be selected at a time. For instance, in a survey form, users
might select their preferred payment method using radio buttons. When a radio button is
selected, any previously selected button in the same group is automatically deselected. This
behavior helps enforce single-choice scenarios. Developers use the
setOnCheckedChangeListener() method to respond to user interactions, such as
updating the app’s state or triggering other actions based on the selected option. The
isChecked() method checks if a radio button is selected, providing a way to retrieve the
current user choice programmatically.

3. List all the files and folders available in the Android Studio project
pane

In Android Studio, the Project Pane includes several key folders and files:

● manifest: Contains AndroidManifest.xml, which outlines app components,


permissions, and configurations.
● java: Holds the Java/Kotlin source code files where app logic and functionality are
implemented.
● res: Contains resources like layouts (layout folder), drawable assets (drawable
folder), and values (values folder for strings, colors, dimensions).
● Gradle Scripts: Includes build configuration files such as build.gradle, which
manage dependencies and build settings.
● build: A generated folder where compiled code and APK files are stored.
● libs: Contains third-party libraries used by the project. It’s used if the project includes
external .jar files.
1. What is Android? Discuss features of Android

Android is an open-source mobile operating system developed by Google, based on the


Linux kernel. It is designed for a range of devices, including smartphones, tablets,
smartwatches, and TVs. Key features of Android include:

● Open Source: Allows customization and modification by developers, supporting a


wide range of devices and custom ROMs.
● Multi-tasking: Enables running multiple apps simultaneously, providing a seamless
user experience.
● Customizable UI: Users can personalize their home screens with widgets, themes,
and launchers.
● Google Play Integration: Provides access to millions of apps, games, and updates
through the Google Play Store.
● Notifications System: Delivers real-time notifications and actionable alerts.
● Device Compatibility: Works across various hardware types, from phones to IoT
devices, ensuring broad compatibility.

2. Explain the manifest file of Android

The AndroidManifest.xml file is crucial for defining an Android app’s structure and
requirements. It includes:

● App Components: Declarations for Activities, Services, Broadcast Receivers,


and Content Providers. It specifies which components are available and how they
interact.
● Permissions: Lists permissions required by the app, such as INTERNET or
ACCESS_FINE_LOCATION, to access protected system features or user data.
● Minimum SDK Version: Specifies the minimum version of Android the app can run
on, ensuring compatibility with older or newer devices.
● App Entry Point: Defines the main activity that launches when the app starts, using
<intent-filter> to handle the MAIN action.
● Hardware and Software Features: Declares hardware features the app uses, like
cameras or sensors, to ensure it is installed only on devices with the required
capabilities.

3. Discuss Button and CheckBox widget of Android

● Button: A Button is a clickable UI element that performs an action when pressed. It


can be customized with text, colors, and styles. Developers use the
setOnClickListener() method to handle click events, allowing the button to
trigger actions such as submitting a form, navigating to another screen, or performing
calculations. Buttons are a fundamental part of user interfaces, providing a way for
users to interact with the app.
● CheckBox: A CheckBox allows users to select or deselect options independently
from a set. It can be used to gather multiple selections from a list, like choosing
hobbies or preferences. Unlike radio buttons, checkboxes are not mutually exclusive,
meaning multiple checkboxes can be selected at once. Developers use methods like
isChecked() to check if a checkbox is selected and
setOnCheckedChangeListener() to respond to changes in its state, updating
the app accordingly.

You might also like