DEPARTMENT OF INFORMATION
COMMUNICATION TECHNOLOGY
CHAPTER ONE: INTRODUCTION TO ANDROID
PRESENTED BY: ENG MECAD ABDILAHI
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 1
Grading Policy
Attendance 5
Quizzes 1, 2, 3 10
Assignment 5
Mid-Exam 30
Final-exam 50
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY
10/25/2020 2
Using this book
Using this book, you will learn how to use these APIs to create
your own Android applications. In this chapter, you’ll learn some
mobile development guidelines and be introduced to the features
available from the Android development platform. Android has
powerful APIs, excellent documentation, a thriving developer
community, and no development or distribution costs. As mobile
devices continue to increase in popularity, this is an exciting
opportunity to create innovative mobile phone applications no
matter what your development background.
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY 3
10/25/2020
What Is Android?
Android is a mobile operating system that is
based on a modified version of Linux. It was
originally developed by a startup of the
same name, Android, Inc. In 2005, as part of
its strategy to enter the mobile space, Google
purchased Android and took over its
development work (as well as its
development team).
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY
10/25/2020
Continue
Google wanted Android to be open and free; hence, most of
the Android code was released under the open-source
Apache License, which means that anyone who wants to use
Android can do so by downloading the full Android source
code. Moreover, vendors (typically hardware manufacturers)
can add their own proprietary extensions to Android and
customize Android to differentiate their products from
others.
This simple development model makes Android very
attractive and has thus piqued the interest of many vendors.
This has been especially true for companies affected by the
phenomenon of Apple’s iPhone, a hugely successful product
that revolutionized the smartphone industry.
5
10/25/2020 Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY
Continue
Such companies include Motorola and Sony
Ericsson, which for many years have been
developing their own mobile operating systems.
When the iPhone was launched, many of these
manufacturers had to scramble to find new ways
of revitalizing their products. These
manufacturers see Android as a solution — they
will continue to design their own hardware and
use Android as the operating system that powers
it.
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY 6
10/25/2020
ORIGIN OF ANDROID
Android was founded in Palo Alto, California in
October 2003 by Andy Rubin, Rich Miner,
Nick Sears and Chris White who work at
“Google” to develop.
Andy Rubin
10/25/2020 Instructor Eng. Mecad Abdilahi EELO 7
ORIGIN OF ANDROID
Android was purchased by the GOOGLE
in AUGUST, 2005 for 50 million $.
The open handset alliance, a group of several
companies was formed -5-November 2007
Android beta released-12 November 2007
• Android Beta SDK Released – 12th November 2007.
• There are more than 4,00,000 apps in android marke
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 8
Versions of andriod
Andriod 1.0 23 September 2008
Andriod 1.1 9 February 2009
Andriod 1.5 (Cupcake) 30 April 2009
Andriod 1.6 (Donut) 15 September 2009
Andriod 2.0 (Éclair) 26 October 2009
Andriod 2.2 (Froyo) 20 May 2010
Andriod 2.3 (Gingerbread) 6 December 2010
Andriod 3.0 (Honeycomb) 10 May 2011
Andriod 4.0 19 October 2011
(Ice Cream Sandwich)
Andriod 4.1 ,4.2,4.3 13 July 2012
(Jelly bean)
Andriod 4.4 (Kitkat) 31 October 2013
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 9
Goals
Android is an open source software stack
that includes the operating system,
middleware, and key applications along
with a set of API libraries for writing
mobile applications that can shape the
look, feel, and function of mobile
handsets. Small, stylish, and versatile,
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 10
Continue
modern mobile phones have become powerful tools
that incorporate cameras, media players, GPS
systems, and touch screens. As technology has
evolved, mobile devices have become about more
than simply making calls, but their software and
development platforms have struggled to keep pace.
Until recently, mobile phones were largely closed
environments built on proprietary operating
systems that required proprietary development
tools.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 11
What It Is not
As a disruptive addition to a mature field, it’s not hard to see why there
has been some confusion about what exactly Android is. Android is
not:
❑ A Java ME implementation Android applications are written using
the Java language, but they are not run within a Java ME virtual
machine, and Java-compiled classes and executables will not run
natively in Android.
A mobile phone handset Android includes a reference design for
mobile handset manufacturers, but unlike the iPhone, there is no
single “Android Phone.” Instead, Android has been designed to
support many alternative hardware devices.
❑ Google’s answer to the iPhone The iPhone is a fully
proprietary hardware and software platform released by a single
company (Apple), while Android is an open source software stack
produced and supported by the Open Handset Alliance and
designed to operate on any handset thatInstructor
[Link] requirements
Mecad Abdilahi EELO .
10/25/2020 UNIVERSUTY 12
Android Devices in the Market
Android devices come in all
shapes and sizes. As of late
November 2010, the Android OS
can be seen powering
the following types of devices:
➤➤ Smartphones
➤➤ Tablets
➤➤ E-reader devices
➤➤ Netbooks
➤➤ MP4 players
➤➤ Internet TVs
13
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY
10/25/2020
Smart Phones
HTC G1,
Droid,
Tattoo Motorola Droid (X)
Suno S880 Samsung Galaxy Sony Ericsson
Instructor Eng. Mecad Abdilahi EELO
@2011 Mihail L. Sichitiu10/25/2020 UNIVERSUTY 4 14
Tablets
Velocity Micro Cruz Gome FlyTouch Acer beTouch
Toshiba Android Cisco Android Tablet
Dawa D7 SmartBook
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 5 15
Features of andriod
Andriod can run multiple apps at the same time
Also support optimized graphics VGA, 2D
graphics and 3D graphics.
• Andriod has better app market.
Andriod lets you change your setting faster.
It gives you more options to fit your budget
Andriod keeps information visible on your home
screen.
Android also support java applications.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 16
WHAT IS ANDROID ARCHITECTURE
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 17
Application
• Android will ship with a set of core applications including an
email client, SMS program, calendar, maps, browser,
contacts, and others. All applications are written using the
Java programming language.
Application Framework
• The application framework provides the classes used to
create Android applications. It also provides a generic
abstraction for hardware access and manages the user
interface and application resources.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 18
Libraries
Libraries
❑ Libraries Running on top of the kernel, Android includes
various C/C++ core libraries such
as libc and SSL, as well as:
❑ A media library for playback of audio and video media
❑ A Surface manager to provide display management
❑ Graphics libraries that include SGL and OpenGL for 2D
and 3D graphics
❑ SQLite for native database support
❑ SSL and WebKit for integrated web browser and Internet
security
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 19
Android Run Time
Android Runtime
• Android includes a set of core libraries
that provides most of the functionality
available in the core libraries of the Java
programming language.
• Every Android application runs in its
own process, with its own instance of
the Dalvik virtual machine.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 20
Linux Kernel
Core services (including hardware drivers, process
and memory management,
security, network, and power management) are
handled by a Linux 2.6 kernel. The kernel also
provides an abstraction layer between the hardware
and the remainder of the stack.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 21
• Advantages:
1. Multitasking
2. Easy of Notifications
3. Easy access to thousands of applications via the
Google Android Android App Market
4. Can install a modified ROM
5. Widget
6. Voice typing and actions
7. Support VGA,2D & 3D.
• Disadvantages:
1. Continuous Internet connection
2. Advertising Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 22
Require Tools JAVA JDK
The Android SDK makes use of the Java SE
Development Kit (JDK). Hence, if your
computer does not have the JDK installed, you
should start by downloading the JDK from
[Link]/technetwork/java/javase/down
loads/[Link] and installing it prior to
moving to the next section.
23
10/25/2020
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY
Require Tools Android SDK
The next important piece of software you need to
download is, of course, the Android SDK. The
Android SDK contains a debugger, libraries, an
emulator, documentation, sample code, and
tutorials. You can download the Android SDK
from [Link]
Once the SDK is downloaded, unzip its content
(the android-sdk-windows folder)
into the C:\Android\ folder, or whatever name you
have given to the folder you just
created.
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY 24
10/25/2020
SQLite Database for Data Storage and Retrieval
Rapid and efficient data storage and retrieval are
essential for a device whose storage capacity is
limited by its compact nature.
Android provides a lightweight relational database
for each application using SQLite. Your
applications can take advantage of the managed
relational database engine to store data securely and
efficiently.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 25
Shared Data and Inter application Communication
Android includes three techniques for transmitting information
from your applications for use elsewhere:
Notifications, Intents, and Content Providers.
Notifications are the standard ways in which a mobile device
traditionally alerts users. Using the API, you can trigger audible
alerts, cause vibration, and flash the device’s LED, as well as
control status bar
Intents provide a mechanism for message passing within and
between applications. Using Intents, you can broadcast a desired
action (such as dialing the phone or editing a contact) system-
wide for other applications to handle.
Finally, Content Providers are a way to give managed access to
your application’s private database. The data stores for native
applications, such as the Contact Manager, are exposed as
Content Providers so you can create your own applications that
Instructor Eng. Mecad Abdilahi EELO
read or modify these data stores.
10/25/2020 UNIVERSUTY 26
Why andriod os is better than iphone os
Programming Language
Android OS: Java
iOS: Objective C
Development Platform
Android OS:
◦ open platform, allowing the use of 3rd party tools
iOS:
◦ Fixed set of tools, nothing outside, nothing deep
Security
Android OS:
◦ Access control, isolation, web security
◦ Encryption
◦ iOS: Geolocation & Auto Erase
Why andriod os is better than iphone os?
App Approval
Android OS:
◦ Very quick!
iOS:
◦ Days.. and days.. and days..
Payments and Availability
Android OS:
◦ Developer pays $25 one time
iOS:
◦ Developer pays $99 annually
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 28
Use this Sources to know some Android
and iOS
[Link]
d-iphone-its-two-horse-race-125203
j
[Link]
[Link]
[Link]
[Link]
[Link]
/
[Link]
-and-cons-of-two-app-platforms-825/
[Link]
d-and-ios-a-developer%E2%80%[Link]
’
[Link]
[Link]
Why Develop for Android?
In market terms, the growth in portable devices is a
worldwide phenomenon, with mobile-phone
ownership outstripping computer ownership in many
countries. The increasing popularity of smartphones
— multifunction devices including a phone but
featuring cameras, Internet access, media players,
Wi-Fi,
and GPS services — combined with the increasing
availability of mobile broadband and Wi-Fi has created
a growth market for advanced mobile applications.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 30
Features of Android
As Android is open source and freely available to
manufacturers for customization, there are no fixed
hardware and software configurations. However,
Android itself supports the following features:
➤➤Storage — Uses SQLite, a lightweight
relational database, for data storage. Chapter 6
discusses
data storage in more detail.
➤➤Connectivity — Supports GSM/EDGE, IDEN,
CDMA, EV-DO, UMTS, Bluetooth (includes
A2DP and AVRCP), WiFi, LTE, and WiMAX.
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY 31
10/25/2020
Features of Android
➤➤Messaging — Supports both SMS and
MMS..
➤➤Web browser — Based on the open-
source WebKit, together with Chrome’s
➤➤Media support — Includes support for
the following media: H.263, H.264 (in 3GP or
MP4
container), MPEG-4 SP, AMR, AMR-WB (in
3GP container), AAC, HE-AAC (in MP4 or
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 32
Continue
Hardware support — Accelerometer Sensor, Camera,
Digital Compass, Proximity Sensor, and GPS
➤➤Multi-touch — Supports multi-touch screens
➤➤Multi-tasking — Supports multi-tasking applications
➤➤Flash support — Android 2.3 supports Flash 10.1.
➤➤Tethering — Supports sharing of Internet connections as
a wired/wireless hotspot
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY 33
10/25/2020
Android Application Architecture
The following application services are the architectural cornerstones of all
Android applications, providing
the framework you’ll be using for your own software:
❑ Activity Manager Controls the life cycle of your activities, including
management of the activity stack described
❑ Views Are used to construct the user interfaces for your activities as
described
❑ Notification Manager Provides a consistent and non-intrusive
mechanism for signaling your users as described
❑ Content Providers Lets your applications share data between
applications as described
❑ Resource Manager Supports non-code resources like strings and graphics
to be externalized
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 34
Android Libraries
Android offers a number of APIs for developing your applications. The
following list of core APIs should provide an insight into what’s available;
all Android devices will offer support for at least
these APIs:
❑ [Link] The core utility package contains low-level classes like
specialized containers,
string formatters, and XML parsing utilities.
❑ [Link] The operating system package provides access to basic
operating system services like message passing, interposes
communication, clock functions, and debugging.
❑ [Link] The graphics API supplies the low-level graphics
classes that support canvases, colors, and drawing primitives,
❑ [Link] The text processing tools for displaying and parsing text.
❑ [Link] Supplies the low-level classes required for handling
cursors when working
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 35
Android Libraries
[Link] The content API is used to manage data access
and publishing by providing
services for dealing with resources, content providers, and
packages.
❑ [Link] Views are the core user interface class. All user
interface elements are constructed
using a series of Views to provide the user interaction components.
❑ [Link] Built on the View package, the widget classes
are the “here’s one we created
earlier” user-interface elements for you to use in your applications.
They include lists, buttons,
and layouts.
❑ [Link] A high-level API that provides access
to native map controls that you can use within your application.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 36
Advanced Android Libraries
[Link] The location-based services API gives your
applications access to the device’s current physical location.
❑ [Link] The media APIs provide support for
playback and recording of audio and video media fi les.
❑ [Link] Android offers a powerful 3D rendering
engine using the OpenGL ES API
❑ [Link] Where available, the hardware API
exposes sensor hardware including the camera, accelerometer,.
❑ [Link], [Link] , and
[Link] Android also provides low-level access to
the hardware platform, including Bluetooth, Wi-Fi,
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 37
Anatomy of an Android Application
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY 38
10/25/2020
Summary
This chapter has provided a brief overview of
Android, and highlighted some of its capabilities.
If you have followed the sections on downloading
the tools and SDK, you should now have a working
system — one that is capable of developing more
interesting Android applications other than the Hello
World application. In the next chapter, you will
learn about the concepts of activities and intents,
and the very important roles they play in Android .
Instructor Eng. Mecad Abdilahi EELO UNIVERSUTY 39
10/25/2020
You also learned:
The next chapter will help you get started by
downloading and installing the Android SDK and setting
up an Android development environment in Eclipse.
You’ll also learn how to use the Android developer tools
plug-in to streamline development, testing, and
debugging before creating your first Android application.
After learning about the building blocks of Android
applications, you’ll be introduced to the different types
of applications you can create, and you’ll start to
understand some of the design considerations that should
go into developing applications for mobile devices.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 40
The Future
In Android, all applications have equal standing.
Third-party and native Android applications are
written using the same APIs and are executed on the
same run time. Users can remove and replace any
native application with a third-party developer
alternative; even the dialer and home screens can be
replaced.
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 41
Q&A
Instructor Eng. Mecad Abdilahi EELO
10/25/2020 UNIVERSUTY 42