Unit 01
Unit 01
Introduction to Android
History of Android
2003: Android Inc. was founded by Andy Rubin, Rich Miner, Nick Sears, and
Chris White. Initially, it aimed to develop an advanced operating system for digital
cameras.
2005: Google acquired Android Inc., seeing its potential for mobile devices.
Rubin and his team joined Google to continue development.
2007: The Open Handset Alliance (OHA) was formed, and Android was officially
announced as an open-source mobile platform.
2008: The first Android device, the HTC Dream (T-Mobile G1), was released.
Features of Android
1. Open Source
2. Highly Customizable
4. App Ecosystem
Supports millions of apps via the Google Play Store and third-party app stores.
Offers flexibility for developers with support for multiple programming languages
(e.g., Java, Kotlin, and C++).
5. Frequent Updates
1
6. Multitasking
7. Google Integration
Deep integration with Google services, including Google Assistant, Maps, Gmail,
and Drive.
8. Multi-Device Compatibility
1. Linux Kernel
Acts as the core of Android, providing essential system services like memory
management, security, and device hardware abstraction.
Executes apps and manages their performance using Ahead-of-Time (AOT) and
Just-in-Time (JIT) compilation for better speed and efficiency.
3. Application Framework
4. Libraries
Includes essential libraries like WebKit (for web browsing), OpenGL (for
graphics), and SQLite (for databases).
The Open Handset Alliance (OHA) is a consortium of leading technology and mobile
industry companies that was announced by Google on November 5, 2007. The
alliance's primary goal is to develop and promote open standards for mobile devices to
accelerate innovation and offer a superior mobile experience to consumers.
Founding Members
The OHA consists of over 80 companies spanning different sectors of the mobile and
technology industry. Some notable founding members include:
1. Software Companies
HTC
Motorola (now part of Lenovo)
Samsung
LG
Sony Ericsson (now Sony Mobile)
3. Semiconductor Companies
Qualcomm
Intel
NVIDIA
3
Broadcom
Texas Instruments
T-Mobile
Sprint
Vodafone
China Mobile
NTT DoCoMo
1. For Developers:
o A unified platform simplifies app development and distribution.
o Access to APIs and tools like Android Studio boosts productivity.
2. For Manufacturers:
o Reduced time-to-market due to a ready-made operating system.
o Flexibility to create custom interfaces and features.
3. For Network Operators:
o Ability to bundle services and customize Android for regional needs.
4. For Consumers:
o Wide variety of affordable and feature-rich devices.
o Access to a vast app ecosystem through Google Play.
4
Allows manufacturers, developers, and enthusiasts to create their own versions
of Android (e.g., custom ROMs).
Encourages innovation by making the OS freely available for modification and
use.
A proprietary software layer from Google that provides essential APIs and
services, including:
o Location services
o Push notifications
o Google Maps integration
o Authentication (e.g., via Google accounts)
o Play Protect: Security features for apps and devices.
A large community of developers builds apps for Android using tools like Android
Studio.
Developers utilize APIs from AOSP and Google Play Services to enhance
functionality.
The Google Play Store is the primary distribution platform for apps, offering a
revenue-sharing model for developers.
2.5 Users
Billions of active users make Android the most popular mobile operating system
globally.
5
Users benefit from diverse device options, extensive app availability, and
seamless integration with Google services.
3.1 Smartphones
3.2 Tablets
3.3 Wearables
Android supports Internet of Things (IoT) devices like smart speakers, home
appliances, and more.
Google Play Store is the primary marketplace, offering over 3 million apps.
Alternative app stores (e.g., Amazon Appstore, Samsung Galaxy Store) provide
additional options.
Core Google services include Gmail, Google Maps, Google Drive, and YouTube.
Google Assistant integrates voice-based AI across devices.
6
Need for Android :-
The need for Android stems from the demands of a rapidly evolving mobile and digital
ecosystem. Its creation addresses the challenges faced by users, developers,
manufacturers, and the technology industry. Here's why Android has become essential:
1. Universal Accessibility
Android powers devices in over 190 countries, providing connectivity and access
to technology for billions of people.
2. Open-Source Nature
2.1 Flexibility
4. Developer-Friendly Environment
7
4.1 Large User Base
Android has billions of active users, offering developers a vast audience for their
apps.
Tools like Android Studio provide robust support for app development, including
debugging, testing, and integration with hardware.
Developers can earn through app sales, in-app purchases, advertisements, and
subscriptions.
Open standards and APIs encourage developers to create new features, apps,
and services.
5. Consumer-Centric Features
5.1 Customization
Users can personalize their devices with themes, widgets, launchers, and
accessibility settings.
Pre-installed services like Gmail, Google Maps, Google Drive, and YouTube
provide a seamless experience.
The Google Play Store offers millions of apps for various use cases, including
productivity, gaming, and social networking.
8
o Foldable Displays and innovative hardware designs.
2. Programming Languages
2.1 Kotlin
2.2 Java
Includes the tools and APIs needed to build and test Android apps.
Key components:
o Build Tools: Compilers and tools to create APK files.
o Platform Tools: adb (Android Debug Bridge) for device communication.
o Android Emulator: Simulates Android devices for testing.
9
o System Images: Virtual Android devices for various API levels.
4. Testing Tools
Espresso: UI testing.
JUnit: Unit testing.
Robolectric: Simulates Android environment for unit tests.
6. Design Tools
7.1 Firebase
7.2 SQLite
8.1 Gradle
9.1 Logcat
Architecture of Android :-
11
o Applications
o Application Framework
o Android Runtime
o Platform Libraries
o Linux Kernel
1. Applications
An application is the top layer of the android architecture. The pre-installed applications
like camera, gallery, home, contacts, etc., and third-party applications downloaded
from the play store like games, chat applications, etc., will be installed on this layer.
It runs within the Android run time with the help of the classes and services provided
by the application framework.
2. Application framework
12
It includes different types of services, such as activity manager, notification manager,
view system, package manager etc., which are helpful for the development of our
application according to the prerequisite.
o Activity Manager: Controls all aspects of the application lifecycle and activity
stack.
o Content Providers: Allows applications to publish and share data with other
applications.
o Resource Manager: Provides access to non-code embedded resources such as
strings, colour settings and user interface layouts.
o Notifications Manager: Allows applications to display alerts and notifications to
the user.
o View System: An extensible set of views used to create application user
interfaces.
3. Application runtime
Android Runtime environment contains components like core libraries and the Dalvik
virtual machine (DVM). It provides the base for the application framework and powers
our application with the help of the core libraries.
Like Java Virtual Machine (JVM), Dalvik Virtual Machine (DVM) is a register-based
virtual machine designed and optimized for Android to ensure that a device can run
multiple instances efficiently.
It depends on the layer Linux kernel for threading and low-level memory management.
The core libraries enable us to implement android applications using the
standard JAVA or Kotlin programming languages.
4. Platform libraries
The Platform Libraries include various C/C++ core libraries and Java-based libraries
such as Media, Graphics, Surface Manager, OpenGL, etc., to support Android
development.
o app: Provides access to the application model and is the cornerstone of all
Android applications.
o content: Facilitates content access, publishing and messaging between
applications and application components.
o database: Used to access data published by content providers and includes
SQLite database, management classes.
o OpenGL: A Java interface to the OpenGL ES 3D graphics rendering API.
o os: Provides applications with access to standard operating system services,
including messages, system services and inter-process communication.
o text: Used to render and manipulate text on a device display.
o view: The fundamental building blocks of application user interfaces.
13
o widget: A rich collection of pre-built user interface components such as buttons,
labels, list views, layout managers, radio buttons etc.
o WebKit: A set of classes intended to allow web-browsing capabilities to be built
into applications.
o media: Media library provides support to play and record an audio and video
format.
o surface manager: It is responsible for managing access to the display
subsystem.
o SQLite: It provides database support, and FreeType provides font support.
o SSL: Secure Sockets Layer is a security technology to establish an encrypted link
between a web server and a web browser.
5. Linux Kernel
Linux Kernel is the heart of the android architecture. It manages all the available drivers
such as display, camera, Bluetooth, audio, memory, etc., required during the runtime.
The Linux Kernel will provide an abstraction layer between the device hardware and
the other android architecture components. It is responsible for the management of
memory, power, devices etc. The features of the Linux kernel are:
o Security: The Linux kernel handles the security between the application and the
system.
o Memory Management: It efficiently handles memory management, thereby
providing the freedom to develop our apps.
o Process Management: It manages the process well, allocates resources to
processes whenever they need them.
o Network Stack: It effectively handles network communication.
o Driver Model: It ensures that the application works properly on the device and
hardware manufacturers responsible for building their drivers into the Linux build.
14