Android
Android
What is Android?: Android is a mobile operating system based on a modified version of Linux. It is
originally open source and free. The first version is Android 1.0 (Tiramisu).
Features of Android:
Connectivity: Supports GSM, EDGE, 3G, 4G, Wi-Fi, Bluetooth, LTE, and more.
Web Browsing: Based on open-source web technologies, featuring a Chrome browser engine.
Media Support: Handles formats like H.263, H.264, MP4, and others.
Hardware Support: Includes accelerometer, camera, digital compass, multi-touch screen, flash
support, wireless earpiece connections, and hotspots.
Application Framework: Includes Application Home, Technical Aspects, and Core Application
Framework components like Activity, View System, and Service Providers.
Runtime and Libraries: Core Libraries including FreeType, WebKit, and the Dalvik Virtual Machine are
key components.
Hardware Layer: Consists of Device Drivers (Camera, Flash, Innovations), Binder (for inter-process
communication), Keypad, Wi-Fi, Audio, and Power Management.
Dalvik Virtual Machine: A special virtual machine optimized for mobile devices, focusing on efficient
power usage and performance. It is the core engine for running Android applications and includes
layers for security and graphics processing.
Surface Manager: Manages different application windows and interfaces, ensuring smooth operation
and user interaction.
Webkit: The kernel of Web Browsing in Android, ensuring efficient and effective internet navigation.
Static Applications: These are applications that do not require an internet connection, such as
calculator and camera apps.
Dynamic Applications: These are applications that rely on an internet connection, like Facebook and
music streaming apps.
Frontend and Backend in Android:
Frontend Development: This involves what a user is able to see and interact with, such as images,
text, and other UI elements. These are usually designed in XML and constitute the visual aspects of
Android applications.
Backend Development: This part of the development is not visible to users. It includes elements like
databases and is a crucial part of the backend functionality of Android applications.
Application Processing: Involves the use of Android Development Environment (ADE) and Android
Virtual Devices (AVD). It also includes development on actual Android devices.
Execution and Compilation: Discusses the compilation and execution process in Android, including
the installation of mobile apps. It implies that Android applications are similar to executable files in
other operating systems.
Android Kernel:
Hardware Component Integration: The kernel includes device drivers for various hardware
components of Android devices, ensuring seamless integration and functionality.
Libraries in Android:
Core Code Libraries: These libraries contain the core code that provides the main features of
Android, including database support and functionalities for web browsing.
Webkit Library: Provides functionalities for web browsing, an essential part of the Android
experience.
Android Runtime:
Partition and Application Running: The runtime provides the environment for running Android
applications using Java. It includes the Dalvik Virtual Machine, which enables each app to run its own
process.
Dalvik Virtual Machine: A virtual toolbox for Android, optimized for battery efficiency in devices with
limited memory and CPU resources.
Application Framework:
Framework Capabilities: Exposes various capabilities of the Android OS to application developers,
allowing them to utilize these features in their applications.
Application Interaction: The framework enables top-layer applications to interact with the Android
device (like phone controls, browser, etc.) and manages applications downloaded or installed from
the Android market. It also locates applications that users have downloaded, providing a
comprehensive management system.
Encourages the ability to publish and share activities securely with another application. The
following application services are architectural cornerstones of all Android applications:
Activity Manager: Controls the life cycle of your activities, including the start of activities.
Key Element of Android: The Dalvik VM is a custom VM design, allowing multiple instances to run
efficiently on a variety of devices.
Underlying Linux Kernel: The Dalvik VM gives the device underlying Linux license compatibility,
providing low-level functionality including security, threading, and memory management. It also
makes it possible to write CC++ or other applications directly on the underlying Linux OS.
Foreground Apps:
These are apps that are useful only when actively used in the foreground. They are effectively
suspended when not visible.
Background Apps:
Applications with limited interaction, often spending much of their time hidden.
Common examples include caching, evening, and SMS auto-responders.
Intermittent Apps:
Users can create interactive, visual elements that they can add to their home screen.
These are typically used to display dynamic information, such as battery level, weather updates,
time, date, etc.
Source Code: Contains Java source files needed for your project, like MainActivity.java.
Resource Directory: Contains drawable resources, layout files, and other resources used in the
project. These files are referenced throughout the project.
Android Library (Current Version): This contains a file called Android.jar, which includes all the
necessary class libraries for an Android application.
Assets Folder: Holds assets used by your application such as task files, database files, etc., and all the
downloadable resources.
Layouts and Values: Contains layout files (layout) and values for various resources.
Manifest File: AndroidManifest.xml is the manifest file for the Android application. It specifies the
permissions needed by your application and other features. It also includes other details such as
application components.
Define the User Interface (UI) and facilitate user interaction with the smartphone.
For example, an email application might have one activity that shows a list of emails and another to
compose an email.
Services:
Used for long-running operations. For instance, a service might play music in the background while
the user is in a different application, or it might fetch data over the network without blocking user
interaction via an activity.
Code Examples:
Service Example: Illustrates how a service is defined for handling background tasks.
Broadcast Receivers
Broadcast Receivers: They handle communication between the Android system and applications.
Broadcast receivers respond to system-wide broadcast messages. For example, applications can
initiate broadcasts to let other applications know that some data is available for use.
Content Providers
Content Providers: These components handle data and database management issues. They supply
data from one application to others on request. Content providers ensure that the data is always
available in the required format.
Activities: Represent the user interface. For example, an email application might have one activity
for showing a list of emails and another for composing an email.
Services: Handle background processing. A service might play music in the background or fetch data
over the network without blocking user interaction.
Broadcast Receivers: Handle communication between the Android system and applications,
responding to broadcast messages.
Content Providers: Manage data and database management issues, supplying data from one
application to others on request.
Table Layout: Organizes views in rows and columns, each row containing multiple views.
Relative Layout: Enables positioning views relative to each other or the parent view.
Discusses handling screen orientation changes, including techniques like anchoring views to the
edges and resizing/repositioning views according to the orientation.
Android Animation
Covers various types of animations, including Translate, Alpha, Scale, and Rotation, used to enhance
the UI.
Resource Management
Details on managing resources like strings, colors, dimensions, and styles for consistency and easier
localization.
Explains using style and theme resources to maintain a consistent look and feel across the
application.
Discusses the structure of an Android project, including essential folders like Assets, Drawable, and
layout files.
Performance Optimization
Offers guidelines for creating optimized layouts and views to enhance performance, including
avoiding unnecessary nesting and deep view hierarchies.
AutoComplete TextView
AutoComplete TextView: This view provides suggestions automatically while the
user is typing, enhancing the user experience in forms or search fields. It utilizes an
adapter to manage the suggestions data.
Progress Bar View
Progress Bar View: Used to provide visual feedback for long-running tasks. For
example, it can be used to show the progress of a file download or a background
task.
Android Animation
Types of Animation: The document describes different types of animations in
Android, such as Translate, Alpha, Scale, and Rotation. Each type serves a specific
purpose:
Translate: Moves a view along the X or Y axis.
Alpha: Changes the transparency of a view.
Scale: Changes the size of a view.
Rotation: Rotates a view around a pivot point.
Handling Resources in Android
String Resources: Externalizing strings for consistency and easier localization.
Color Resources: Defining colors using hexadecimal values.
Dimension Resources: Specifying sizes and margins in consistent units.
Styles and Themes
Styles and Themes: The document explains the use of style and theme resources in
Android. Styles allow specifying attribute values used by views, facilitating a
consistent look and feel.