Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

Mobile Application

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

● Run in system background ● Webkit


● Using C/C++ Language ○ browser engine
● System C library ● OpenGL
○ Bionic libc ○ Graphics engines
● Surface Manager. ● SQLite
○ Display management ○ Relational database engine
● Media Framework
○ Audio/ Video

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

DX (The "dx" tool in Dalvik executes dex


Android SDK can bytecode file
transform compiled
JAVA class into the .dex
format) converts java
bytecode files to a single
dex bytecode file
(classes.dex) 16
Dalvik Virtual ● Designed for resource-
Machine (DVM) constrained environments
○ Slower CPU
○ Less RAM
○ Limited battery life

17
Application
Framework

● Consist of API which allows high-level interactions with the Android system
from Android applications.

● Package Manager: An API (Android Application Kit) that actually manages


application install, uninstall, and upgrade. When we install the APK file,
Package Manager parse the package (APK) file and displays confirmation.

18
Window Manager
Manages the windows
comprising an App.

19
View System

● Provides common user interface elements


● e.g., icons, text entry boxes, buttons and more

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

An activity represents a single screen with a user interface.

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.

● A service does not provide a user interface.

● For example, play music in the background


while the user is in a different app, or it might
fetch data over the network.

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.

● Through the content provider, other apps can


query or even modify the data (if the content
provider allows it).

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.

● For example, a broadcast announcing that the screen


has turned off, the battery is low, or a picture was
captured.

● Although Apps can also initiate broadcasts, many


broadcasts also originate from the system.

31

You might also like