Lecture # 1 - Android Introduction
Lecture # 1 - Android Introduction
Development
● Lecture # 1
● Course Code: CS-442
● Instructor: Zuha Raza
1
Android
Platform
An Overview
2
What is Android
3
Brief History ● Android is a Linux Kernel based OS designed
primarily for touch screens mobile devices.
● It is open source and released under the Apache
License which allows the software to be freely
modified and distributed by device manufacturers as
well as individual users.
● October 2003 - Android Inc. founded
● August 2005 - Google acquires Android
● November 2007 - Android Beta SDK Released
4
Distribution of Android Versions Across Devices
5
Reading Assignment
Distribution of ● https://deviceatlas.com/device-data/explorer/
webusage-by-country/traffic/no-tablet/countr
Android Versions y/gb/type/os_name_version
Region Wise
● https://www.statista.com/statistics/271774/sh
are-of-android-platforms-on-mobile-devices-
with-android-os/
6
Industries
This statistic shows the fastest
growing mobile app categories based
on year-on-year growth of consumer
time spend in 2017. The biggest gains
were made by shopping apps with a
54 percent increase in usage sessions
over the year. The mobile app
category with the largest loss was
lifestyle apps with a 40 percent
decrease.
7
Android
Platform
8
The Android ● A software stack for mobile
Platform devices:
○ OS kernel, system libraries,
application frameworks & key
apps
● Android SDK for creating apps
○ Libraries & development tools
○ Lots of documentation. Start
browsing today!
9
Android Platform Components
10
The Android
Architecture
11
Linux Kernel - ● Communication layer for the underlying
Standard hardware
Services ● Security
● Memory & process management
● File & network I/O
● Device drivers
12
Linux ● Power management
Kernel - ● Android shared memory
Android ● Low memory killer
Specific
● Interprocess communication
13
Libraries
14
Android ● Two main components
Runtime ○ Core Java libraries
■ basic java classes -- java.*,
javax.*
■ app lifecycle -- android.*
■ Internet/Web services -- org. *
■ Unit testing -- junit.*
○ Dalvik Virtual Machine
■ Apps are executed by the
dalvik virtual machine (DVM)
15
App written in java Compiled to Java
Typical bytecode files
Workflow
17
Application
Framework
● Consist of API which allows high-level interactions with the Android system
from Android applications.
18
Window Manager
Manages the windows
comprising an App.
19
View System
20
Others ● Resource Manager: Manages non-compiled
resources e.g., strings, graphics, & layout files
● Activity Manager: Manages app lifecycle and
navigation stack
● Notification Manager: enables all applications
to display custom alerts in the status bar
● Content Provider: Inter-application data
sharing
● Location Manager: Provides location &
movement information
21
Applications ● Standard apps include:
○ Home – main screen
○ Contacts – contacts database
○ Phone – dial phone numbers
○ Browser – view web pages
○ Email reader – compose & read email
○ Messages
○ Any other application you installed
from App Store.
22
Building
Block
23
Application 1. Application components are the essential
building blocks of an Android application. Each
Building component is a different point through which
Blocks the system can enter your app.
There are four different types of app
components:
a. Activities
b. Services
c. Content Providers
d. Broadcast Receivers
24
Activities
25
Activities
An app (for example: email app) might have one activity that shows a list of new
emails, another for reading emails.
26
Activities
A different app can start any one of these
activities. For example, another app can
start the activity in the email app that
composes new mail.
27
Services ● A service is a component that runs in the
background to perform long-running
operations.
28
Content ● A content provider manages a shared set of
app data.
Providers
● You can store the data in the file system, an
SQLite database, on the web, or any other
persistent storage location your app can
access.
29
Content Providers
● For example, the Android system
provides a content provider that
manages the user's contact
information.
● As such, any app with the proper
permissions can query part of the
content provider to read and write
information about a particular
person.
30
Broadcast ● A broadcast receiver is a component that responds to
system-wide broadcast announcements.
Receivers
● Broadcast receivers don't display a user interface,
but in some cases a status bar notification is created
to alert the user when a broadcast event occurs.
31