MA Unit2
MA Unit2
MA Unit2
Android Terminologies
1. Android: Android is a mobile operating system
developed by Google. It is based on a modified version of the
Linux kernel and other open-source software and is designed
primarily for touchscreen mobile devices such as smartphones
and tablets.
2. APK (Android Package): An APK is the file format
used to distribute and install applications on Android devices.
It contains all the elements that an app needs to install
correctly on an Android device, including code, resources,
assets, and manifest file.
3. SDK (Software Development Kit): The Android SDK
is a set of development tools that enable developers to create
applications for the Android platform. It includes a
comprehensive set of libraries, debugging tools, emulators,
and documentation.
4. API (Application Programming Interface): In the
context of Android development, an API is a set of rules and
protocols that allow different software applications to
communicate with each other. Android provides various APIs
for developers to access system features such as camera,
sensors, location, and more.
5. UI (User Interface): UI refers to the graphical layout of
an application, including elements such as buttons, text fields,
images, and navigation menus. Android provides various UI
components and layouts for developers to design their app
interfaces.
6. Activity: An Activity is a single, focused task that the
user can interact with in an Android application. It represents
a single screen with a user interface. Activities are the
building blocks of an Android app and are typically defined in
the app's manifest file.
7. Fragment: A Fragment is a modular section of an
activity that has its own lifecycle, layout, and behavior.
Fragments are often used to create more flexible and reusable
UI components within an activity.
8. Intent: An Intent is a messaging object that is used to
request an action from another app component, such as
starting a new activity, broadcasting a message, or delivering
a data payload. Intents are a fundamental part of Android's
inter-application communication system.
9. Layout: A Layout is a structured arrangement of UI
elements within an Android application. It defines the visual
structure and appearance of the user interface, including the
placement and sizing of buttons, text fields, images, and other
components.
10. Manifest: The AndroidManifest.xml file is a
configuration file that contains essential information about an
Android application, such as its package name, version,
permissions, activities, services, and broadcast receivers. It is
required for every Android app and is used by the Android
system to identify and manage the app's components.
11. Gradle: Gradle is the build automation tool used for
building, testing, and deploying Android applications. It
allows developers to define the build configuration,
dependencies, and tasks for their projects using a Groovy-
based DSL (Domain-Specific Language).
12. ADB (Android Debug Bridge): ADB is a command-
line tool that allows developers to communicate with an
Android device or emulator from a computer. It can be used to
install and debug applications, transfer files, and access
various device functionalities for testing and development
purposes.
Application Context
What is Context?
In Android, Context is an abstract class whose
implementation is provided by the Android system. It
represents various aspects of an application's environment,
such as its current state, resources, and access to application-
specific operations.
Types of Context:
In Android, there are two primary types of Context:
Application Context: Represents the overall
environment of the application. It's tied to the lifecycle of
the application and is not tied to any specific activity. It's
accessible throughout the entire lifespan of the
application.
Activity Context: Represents the environment of a
specific activity within the application. It's tied to the
lifecycle of that activity and provides access to activity-
specific resources and operations.
2. Background Services:
Background services do not require any user intervention.
These services do not notify the user about ongoing
background tasks and users also cannot access them. The
process like schedule syncing of data or storing of data fall
under this service.
3. Bound Services:
This type of android service allows the components of the
application like activity to bound themselves with it. Bound
services perform their task as long as any application
component is bound to it. More than one component is
allowed to bind themselves with a service at a time. In order
to bind an application component with a
service bindService() method is used.
Example:
7. Debugging Settings:
debuggable: This attribute specifies whether the application
can be debugged. It should be set to false for release builds.
Example: android:debuggable="true"
8. Screen Orientation:
screenOrientation: This attribute specifies the orientation of
the screen for an activity.
Example: android:screenOrientation="portrait"
3. <data>
Syntax:
<data android:scheme="string"
android:host="string"
android:port="string"
android:path="string"
android:pathPattern="string"
android:pathPrefix="string"
android:mimeType="string" />