0% found this document useful (0 votes)
7 views5 pages

MAD

The document provides an overview of the Android operating system, detailing its architecture, versions, features, and development environment. It explains key components such as Activities, Services, and Intents, as well as resource handling for localization and UI design using Material Design principles. Additionally, it covers development tools, the Android SDK, and various layout types for user interface design.

Uploaded by

trendcloth4u
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)
7 views5 pages

MAD

The document provides an overview of the Android operating system, detailing its architecture, versions, features, and development environment. It explains key components such as Activities, Services, and Intents, as well as resource handling for localization and UI design using Material Design principles. Additionally, it covers development tools, the Android SDK, and various layout types for user interface design.

Uploaded by

trendcloth4u
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/ 5

Unit 1: Android Operating System and Development Environment

Introduction

Android is an open-source operating system primarily used in mobile devices such as smartphones
and tablets. Developed by Google, it is based on the Linux kernel and supports a variety of
applications, most commonly Java and Kotlin. Android’s architecture is designed to be scalable,
from simple mobile applications to advanced enterprise solutions.

Android Architecture

Android’s architecture is structured in layers, each providing a distinct functionality.

• Linux Kernel: The foundation of the Android operating system. It handles low-level system
operations such as device drivers, memory management, and process management.
• Hardware Abstraction Layer (HAL): Provides standard interfaces that allow Android to
work with different hardware.
• Android Runtime (ART): Replaces Dalvik VM in recent versions. ART compiles code
ahead of time (AOT) for improved performance.
• Libraries: Android includes various native libraries for functions like graphics rendering,
database management, and web browsing (e.g., SQLite, OpenGL, WebKit).
• Application Framework: Provides high-level APIs for developers, including services like
window management, resource management, and noti cations.
• Applications: Apps are built on top of this framework and include system apps (like
contacts, calendar, and email) and third-party apps.
Android Versions

Android has undergone many iterations, and each version is named after a dessert or a sweet treat
(e.g., Cupcake, Donut, Ice Cream Sandwich). Android versions typically come with performance
improvements, new features, and changes to the underlying system.

• Key Versions:
◦ Android 1.x – Cupcake, Donut, Eclair
◦ Android 2.x – FroYo, Gingerbread
◦ Android 4.x – Ice Cream Sandwich, Jelly Bean
◦ Android 5.x – Lollipop
◦ Android 6.x – Marshmallow
◦ Android 7.x – Nougat
◦ Android 8.x – Oreo
◦ Android 9.x – Pie
◦ Android 10 – Q (First non-dessert-based name)
◦ Android 11, 12, 13, 14, etc.
Features

• Multi-tasking
• Rich UI and animations
• Noti cation system
• Bluetooth, NFC, Wi-Fi, and other connectivity options
• Content Providers for data sharing
• Built-in GPS support for location-based services
Open Handset Alliance (OHA)
fi
fi
The OHA is a consortium of companies that work together to develop open standards for Android
devices. Google, along with other hardware manufacturers, carriers, and software developers, is a
key member.

Dalvik Virtual Machine (VM)

Dalvik was the original virtual machine that ran Android apps. It is now replaced by ART in recent
Android versions. Dalvik was a register-based VM that used Just-in-Time (JIT) compilation for
running apps.

Android SDK (Software Development Kit)

The Android SDK is a set of tools for developing Android applications. It includes:

• Libraries, documentation, and code samples.


• Android Debug Bridge (ADB) for debugging.
• Emulator for running apps in a virtual environment.
Android Development Tools

• Android Studio: Of cial Integrated Development Environment (IDE) for Android


development.
• Eclipse: Previously used IDE, now less common.
• Gradle: Build automation tool used to manage dependencies and build the application.
Android Virtual Devices (AVD)

An AVD is an emulator con guration that allows you to simulate different types of Android devices
on your computer for testing purposes.

Development Environment

Android development can be done on Windows, macOS, or Linux. Android Studio is the most
commonly used IDE, which provides tools for coding, debugging, testing, and building apps.

Directory Structure of Android Application

The directory structure de nes where your app les will reside.

• src/: Java/Kotlin source les.


• res/: Resources like images, layouts, and strings.
• manifests/: AndroidManifest.xml le.
• libs/: Third-party libraries.
• build/: Output folder for build les.
Android Manifest File

The AndroidManifest.xml le de nes essential information about the app, such as:

• Permissions (e.g., access to the internet, camera, etc.)


• Components (e.g., Activities, Services, Broadcast Receivers)
• Application metadata (app theme, version, etc.)

Unit 2: Android Components and Resource Handling


fi
fi
fi
fi
fi
fi
fi
fi
fi
Android Components

1. Context: Provides information about the application environment and facilitates interaction
with various system services.

◦ Used by Activities, Services, and Broadcast Receivers.


2. Activity: Represents a single screen of an app, typically containing UI elements. It handles
the user interface and user interaction.

◦ onCreate(), onStart(), onResume() are key lifecycle methods.


3. Intent: A messaging object used to request an action from another component (like starting
an Activity, sending data to a Service, or broadcasting a message).

◦ Explicit Intent: Directly speci es the target component.


◦ Implicit Intent: Speci es an action, and the system determines the best component
to handle it.
4. Service: A component used to run background tasks, such as downloading data or playing
music.

◦ Services run in the background and do not provide a UI.


5. Broadcast Receiver: A component that listens for system-wide or app-speci c broadcasts
(like battery low, Wi-Fi status changes). It doesn’t have a UI.

Resources

Android supports different resource types for designing user interfaces and handling app data:

1. String: Resources for storing text that can be accessed programmatically.

◦ res/values/strings.xml contains string resources.


2. Color: Storing color values in XML les.

◦ Example: <color name="primaryColor">#FF5733</color>


3. Drawable: Images or XML les used to de ne visual elements like icons or backgrounds.

◦ Drawables can be vector images (XML) or raster images (PNG, JPEG).


4. Styles and Themes: Styles de ne reusable properties for UI elements, while themes apply
styles to an entire app or activity.

Localization

• Preparing for Localization: You can localize your app by creating resource les speci c to
each language (e.g., res/values-en/strings.xml for English, res/values-
fr/strings.xml for French).
• Strings: Always de ne user-visible strings in XML, so you can easily translate them into
different languages.
• Layouts: You may need to adjust layouts for different languages (e.g., right-to-left text
support for languages like Arabic).

Unit 3: Android User Interface Elements and Layouts

Material Design
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
Material Design is a design language developed by Google. It uses grid-based layouts, responsive
animations, padding, and depth effects (like shadows and lighting) to create visually appealing and
easy-to-use UIs.

UI and UX

• UI (User Interface): Refers to the layout and interactive elements of an app (buttons,
menus, images).
• UX (User Experience): Encompasses the overall experience of using an app, including ease
of use, navigation, and how pleasant the app feels to the user.
Layouts

• Linear Layout: Arranges children in a single row or column (vertical or horizontal).

◦ Example:xml
<LinearLayout android:orientation="vertical">
◦ <Button android:text="Click me"/>
◦ <TextView android:text="Hello"/>
◦ </LinearLayout>

• Absolute Layout: Positions elements at speci c (x, y) coordinates (not recommended as it’s
deprecated).

• Frame Layout: A simple layout used to display one child at a time. It is mainly used for
stacking views on top of each other.

• Relative Layout: Allows you to position children relative to each other (e.g., to the left of,
below, etc.).

• Constraint Layout: A exible layout that allows you to create complex layouts by de ning
constraints between child views.

• Dynamic Layout Implementation: Layouts can be dynamically changed at runtime by


modifying their parameters or adding/removing views programmatically.

UI Widgets

• Buttons: Used to trigger actions.


• TextViews: Display text.
• ImageViews: Display images.
• EditTexts: Allow users to input text.
Dialogs and Menus

• Dialog Boxes: Provide an interactive window to display messages or prompt user actions
(e.g., AlertDialog).

• Menus:

◦ Options Menu: Appears at the top of the screen, typically on a toolbar.


fl
fi
fi
◦ Context Menu: Appears when a user performs a long press on a UI element.

You might also like