Mobile Application Development
(SEng3052)
Yohans Samuel(MSc)
Department of Software Engineering
May,2022
Mobile Application Development 1
Contents
• Mobile Computing
– Communication
– Hardaware
– Software
• Android
– Features
– Versions
– Architecture
• Android Application Development Environment
• Android Application Building Blocks
Mobile Application Development 2
Introduction to Mobile Computing
• Mobile Computing is a technology that provides an
environment that enables users to transmit data from one
device to another device without the use of any physical
link or cables.
• Mobile Computing is a technical field that covers the design,
development and evaluation of mobile applications using
appropriate solutions that meet user requirements.
• This includes learning the technology that is used to
perform a wide variety of tasks on devices that are portable.
• Portable devices include Smart Phones, Tablets, Laptops,
wearable devices, vehicles etc.
Mobile Application Development 3
...
• Mobile devices may have other components that are not in personal
computers, to make them portable, and certain characteristics that
make them different-
– Size: The portability of mobile devices demand a smaller size.
– Power Source: Mobile devices are usually powered by
rechargeable batteries.
– Operating System: They are powerful but scaled-down and made
specifically for particular devices.
– Connectivity: Mobile computing devices have capabilities that
allow access to the internet and to mobile broadband networks
that allow you to make and receive phone calls.
– Applications: Applications meant for mobile devices are specifically
designed for running on a particular OS. These applications are
what extends the capabilities of devices beyond just connecting to
the internet or making calls.
Mobile Application Development 4
...
• Other features generally found in mobile computing devices include GPS
capability, accelerometer, compass, microphone, camera, and so on.
• Mobile computing devices have evolved greatly over time. A lot of the
devices that existed in the past have been phased out, like the Personal
Digital Assistant (PDA).
– Laptop: are portable personal computers that offer the same
functionality as a PC, so the same OS, applications, and files can run on
this.
– Smartphone: a smartphone is a mobile phone with powerful capabilities .
– Tablet computer: are often thought of as an intermediary between a
laptop and a smartphone.
– Wearable: A more recent addi ti on, wearabl e computers l i ke
smartwatches offer limited features similar to a smartphone within a
watch.
– E-reader: devices that are similar to tablets, but their main purpose is to
read digital documents.
Mobile Application Development 5
....
• Other devices include scanners, carputers,
handheld gaming consoles, advanced digital
cameras, smart speakers, and so on.
• The concept of Mobile Computing can be
divided into three parts:
– Mobile Communication
– Mobile Hardware
– Mobile Software
Mobile Application Development 6
Mobile Communication
• Mobile Communication refers to an infrastructure
that ensures seamless and reliable communication
among wireless devices.
• This framework ensures the consistency and
reliability of communication between wireless
devices.
• The mobile communication framework consists of
communication devices such as protocols, services,
bandwidth, and portals necessary to facilitate and
support the stated services.
• These devices are responsible for delivering a
smooth communication process.
Mobile Application Development 7
....
• Computing technology communication can be divided in the
following four types:
– Fixed and Wired: In Fixed and Wired configuration, the devices are
fixed at a position, and they are connected through a physical link to
communicate with other [Link],Desktop Computer.
– Fixed and Wireless : In Fixed and Wireless configuration, the devices
are fixed at a position, and they are connected through a wireless link
to make communication with other [Link], Communication
Towers, WiFi router.
– Mobile and Wired : In Mobile and Wired configuration, some devices
are wired, and some are mobile. They altogether make
communication with other [Link] example, Laptops.
– Mobile and Wireless : In Mobile and Wireless configuration, the
devices can communicate with each other irrespective of their
position. They can also connect to any network without the use of any
wired [Link] example, WiFi Dongle.
Mobile Application Development 8
Mobile Hardware
• Mobile hardware consists of
mobile devices or device
components that can be used to
receive or access the service of
mobility.
• Examples of mobile hardware
can be smartphones, laptops,
portable PCs, tablet PCs.
Mobile Application Development 9
Mobile Software
• Mobile software is a program that runs on mobile
hardware.
• This is designed to deal capably with the
ch aracteri sti cs and req u i re m e nt s o f m o b i l e
applications.
• This is also the operating system for the appliance of
mobile devices. In other words, you can say it the
heart of the mobile systems.
• This is an essential component that operates the device.
Mobile Application Development 10
....
• A mobile operating system is an operating system
that helps to run other application software on
mobile devices.
• It is the same kind of software as the famous
computer operating systems like Linux and Windows,
but now they are light and simple to some extent.
Mobile Application Development 11
....
• Android OS: is the most popular operating system today.
– It is a mobile OS based on the Linux Kernel and open-source software.
– The android operating system was developed by Google.
– The first Android device was launched in 2008.
• Bada (Samsung Electronics): Bada is a Samsung mobile operating system that was
launched in 2010.
– The Samsung wave was the first mobile to use the bada operating system.
– The bada operating system offers many mobile features, such as 3-D graphics,
application installation, and multipoint-touch.
• BlackBerry OS: The BlackBerry operating system is a mobile operating system
developed by Research In Motion (RIM).
– This operating system was designed specifically for BlackBerry handheld
devices.
– This operating system is beneficial for the corporate users because it provides
synchronization with Microsoft Exchange, Novell GroupWise email, Lotus
Domino, and other business software when used with the BlackBerry
Enterprise Server.
Mobile Application Development 12
....
• iPhone OS / iOS: The iOS was developed by the Apple inc for the use on its
device.
– The iOS operating system is also popular operating system today.
– It is a very secure operating system.
– The iOS operating system is not available for any other mobiles.
• Symbian OS: is a mobile operating system that provides a high-level of
integration with communication.
– The Symbian operating system is based on the java language.
– The Symbian operating system was developed by Symbian
Ltd in 1998 for the use of mobile phones.
– Nokia was the first company to release Symbian OS on its mobile
phone at that time.
• Windows Mobile OS: The window mobile OS is a mobile operating system
that was developed by Microsoft.
– It was designed for the pocket PCs and smart mobiles.
Mobile Application Development 13
....
• Harmony OS: The harmony operating system is the latest mobile
operating system that was developed by Huawei for the use of its
devices.
– It is designed primarily for IoT devices.
• Palm OS: The palm operating system is a mobile operating system
that was developed by Palm Ltd for use on personal digital
assistants (PADs).
– It was introduced in 1996. Palm OS is also known as the Garnet OS.
– It’s discontinued.
• WebOS (Palm/HP): The WebOS is a mobile operating system that
was developed by Palm.
– It based on the Linux Kernel.
– The HP uses this operating system in its mobile and touchpads.
Mobile Application Development 14
Introduction to Android
• Android is an operating system and programming platform
developed by Google for mobile phones and other mobile
devices, such as tablets.
• It can run on many different devices from many different
manufacturers.
• Android includes a software development kit (SDK) that
helps you write original code and assemble software
modules to create apps for Android users.
• The Android SDK provides you the API libraries and
developer tools necessary to build, test, and debug apps
for Android.
• Android also provides a marketplace to distribute apps.
• All together, Android represents an ecosystem for mobile
apps.
Mobile Application Development 15
...
• Android is a mobile operating system developed by
Google.
– It is based on a modified version of the Linux
kernel and other open source software, and is
designed primarily for touchscreen mobile
devices such as smartphones and tablets.
• In addition, Google has further developed Android
TV for televisions, Android Auto for cars, and Wear
OS for wrist watches, each with a specialized user
interface.
– Variants of Android are also used on game consoles,
digital cameras, PCs and other electronics.
Mobile Application Development 16
Android Features
• As an open source and freely available software,
manufacturers and developers do customization as per their
needs, so there is no specific hardware and software
configurations required for Android.
• Android itself offers some features as below,
– Storage: Uses SQLite, a light weight relational database
storage for data storage (really helpful when limited
mobile memory storage is to be considered).
– Media Support: Include support for large number of media
formats for Images, Audio as well as for Video, like: H.263,
H.264, MPEG-4 SP, AMR, AMR WB, AAC, MP3, MIDI, WAV,
JPEG, PNG, GIF & BMP.
Mobile Application Development 17
...
– Messaging: Both SMS and MMS are supported.
– Web Browser: Based on Open Source WebKit,
now known as Chrome.
– Connectivity: Supports large group of networks
like: GSM/EDGE, IDEN, CDMA, EV-DO, UMTS,
Bluetooth, WiFi, LTE and WiMAX.
– Hardware Support: Accelerometer Sensor,
Camera, Digital Compass, Proximity Sensor ,GPS
and a lot more.
– Multi-Touch: Supports multi-touch screen.
– Multi-Task: Supports application multi-tasking.
– Flash Support: Supports Flash.
– Tethering: Supports sharing of Internet as wired or
wireless hotspots.
Mobile Application Development 18
Android Versions
• The development of the Android operating system was
started in 2003 by Android Inc.
– Later on, it was purchased by Google in 2005.
– The beta version of Android OS was released on November
5, 2007, while the software development kit (SDK) was
released on November 12, 2007.
• The first Android mobile was publicly released with Android
1.0 of the T-Mobile G1 (aka HTC Dream) in October 2008.
• Google announced in August 2019 that they were ending the
confectionery scheme, and they use numerical ordering for
future Android versions.
• The first Android version which was released under the
numerical order format was Android 10.
Mobile Application Development 19
...
Mobile Application Development 20
Android Architecture
• The Android operating system follows a layered architecture approach. All
these layers are responsible for different roles and features
Mobile Application Development 21
...
• Linux Kernel: This layer is the foundation of the Android
Platform.
– It contains and manages all low level drivers for various
hardware components support.
• Android Runtime relies on Linux Kernel for core system
services like,
– Memory, process management, threading
– Network stack
– Driver model
– Security and more.
• Hardware Abstraction Layer (HAL):Provides Abstraction
between hardware and rest of the software stack.
Mobile Application Development 22
...
• Android Runtime (ART):ART uses DEX files, which is a type
of bytecode, specially designed for Android, which helps
ART to manage memory more efficiently.
• It contains set of core libraries that enables developers to
write Android Apps using Java and Kotlin Programming.
• Prior to Android 5.0, Dalvik was used as Android runtime.
• ART is capable of both Ahead-of-time (AOT) and Just-in-
time (JIT) compilation.
• Zygote is the first Android specific process when Android
OS boots up and preloads all the system resources and
classes used by the Android framework thus achieving fast
app launches.
Mobile Application Development 23
...
• Libraries: it is exposed to developers through Android Application
Framework.
– it contains C/C++ libraries used by components of Android
Systems.
• SQLite Library used for data storage and light in terms of mobile
memory footprints and task execution.
• WebKit Library mainly provides Web Browsing engine and a lot more
related features.
• Surface manager library is responsible for rendering windows and
drawing surfaces of various apps on the screen.
• Media framework library provides media codecs for audio and video.
• OpenGl (Open Graphics Library) and SGL(Scalable Graphics Library)
are the graphics libraries for 3D and 2D rendering, respectively.
• FreeType Library is used for rendering fonts.
Mobile Application Development 24
...
• Application Framework:It is a collection of APIs written in
Java and/or Kotlin, which gives developers access to the
complete feature set of Android OS.
– Developers have full access to the same framework APIs
used by the core applications, so that they can enhance
more in terms of functionalities of their application.
• Enables and simplify the reuse of core components and
services, like:
– Activity Manager: Manages the Lifecycle of apps &
provide common navigation back stack.
– Window Manager: Manages windows and drawing
surfaces, and is an abstraction of the surface manager
library.
– Content Providers: Enables application to access data
from other applications or to share their own data i.e it
provides mechanism to exchange data among apps.
Mobile Application Development 25
...
– View System: Contains User Interface building blocks used to
build an application's UI, including lists, grids, texts, boxes,
buttons,etc. and also performs the event management of UI
elements.
– Package Manager: Manages various kinds of information
related to the application packages that are currently installed
on the device.
– Telephony Manager: Enables app to use phone capabilities of
the device.
– Resource Manager: Provides access to non-code resources
(localized Strings, bitmaps, Graphics and Layouts).
– Location Manager: Deals with location awareness capabilities.
– Notification Manager: Enable apps to display custom alerts in
the status
Mobile Application Development 26
...
• A p p l i cat i o n s : a re at t h e to p o f t h e A n d ro i d
Application Stack, occupied by the System apps and
tones of other Apps
• A set of core applications are pre-packed in the
handset like Email Client, SMS Program, Calendar,
Maps, Browser, Contacts and few more.
• This layer uses all the layers below it for proper
functioning of these mobile apps.
• So as we can see and understand, Android holds
layered functionalities as software stack that makes
Android work very fluently in any device.
Mobile Application Development 27
Android Devices in Market
• A device that runs Android OS comes in all shapes and sizes.
Various devices that run Android OS and Apps are as follows,
– Smartphones,Smart-watches,Tablets,E-reader Devices,Netbooks,MP4
Players,Internet TVs and more.
• In August 2008, Google announced Android Application Market -
an online application store for Android Devices.
• This online store was later on named, Play Store and was made
available to the users in October 2008, allowing users to directly
download any third party application into their devices.
• Both paid and free applications are available on the Play Store.
Mobile Application Development 28
Android Development Environment
• Android Studio is the official IDE for android development
and it’s based on IntelliJ IDEA software.
• It’s available for Windows, Mac and Linux operating
systems.
• Android Studio provides tools for the testing, and
publishing phases of the development process, and a
unified development environment for creating apps for all
Android devices.
• The development environment includes code templates
with sample code for common app features, extensive
testing tools and frameworks, and a flexible build system.
Mobile Application Development 29
...
Mobile Application Development 30
...
• Manifests Folder :This folder contains a manifest file
([Link]) for our android application.
• This manifest file contain information about our
a p p l i cat i o n s u c h a s a n d ro i d ve rs i o n , a c c e s s
permissions, metadata, etc. of our application and its
components.
• The manifest file will act as an intermediate between
android OS and our application.
• Following is the structure of the manifests folder in
the android application.
Mobile Application Development 31
...
Mobile Application Development 32
...
• Java Folder :This folder contain all the java
source code (.java) files which we’ll create during
the application development, including JUnit test
code.
• Whenever we create any new project/application,
by default the class file [Link] will be
created automatically under the given package
name.
Mobile Application Development 33
...
Mobile Application Development 34
...
• r e s ( R e s o u r c e s ) F o l d e r : I t ’s a n
important folder that contain all non-
code resources, such as bitmap images,
UI strings, XML layouts
Mobile Application Development 35
...
• The res (Resources) contain a different type of folders
– Drawable Folder (res/drawable)
• It contain the different types of images as per the
requirement of application.
• I t ’s a b e s t p r a c t i c e t o a d d a l l t h e i m a g e s i n
a drawable folder other than app/launcher icons for the
application development.
– Layout Folder (res/layout)
• This folder will contain all XML layout files
which we used to define the user interface of
our application.
Mobile Application Development 36
...
• The res (Resources) contain a different type of folders
– Mipmap Folder (res/mipmap)
• This folder contain app / launcher icons that are used
to show on the home screen.
• It will contain different density type of icons such as
hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi, to use different
icons based on the size of the device.
– Values Folder (res/values)
• This folder contain various XML files, such as
strings, colors, style definitions and a static
array of strings or integers.
Mobile Application Development 37
...
• Gradle Scripts :In android, Gradle is an automated build
system and by using this we can define a build
configuration that applies to all modules in our
application.
• In Gradle [Link] (Project), and [Link]
(Module) files are useful to build configurations that apply
to all our app modules or specific to one app module.
Mobile Application Development 38
...
Mobile Application Development 39
Android Application Building Blocks
• Android application development is done in
java/kotlin programming language.
• The compiled code is bundled into an Android
package which can be signed and installed on
the mobile phone.
• The Android application can be considered as
a series of processes and the control moves
from one process to another creating an
application for the user to interact with.
Mobile Application Development 40
...
• There is no single entry point for Android
application ,but rather there are components
which can start as the need arises.
• These components can be classified into four
parts:
– Activity
– Service
– Broadcast Receiver
– Content Provider
Mobile Application Development 41
...
• Activity – An activity is used to present visual interface to the user.
• Activity is a simply a single screen in your application that the user
sees on the device at one time, for example, a list of email is one
activity, message details for particular message is another activity.
• An application typically has multiple activities, and the user flips
back and forth among them.
• Even if the activities work together, they are independent of each
other. Each Activity is implemented as the derived class of Activity
class.
• An application may have one or any number of activities. One of the
activities is marked as the first one that should be presented when
the application starts.
• First Activity invoked can in turn invoke other activities.
Mobile Application Development 42
...
• Ser vices – A ser vices does not have a visual
component but runs in the background and carries
out some background process while the other visual
component s are running in the foreground.
• A service will inherit Service base class. It runs in the
main thread and for resource intensive tasks it can
branch out a new thread.
• A service doesn’t have a visual user interface, but
rather runs in background for an indefinite period of
time.
• The best example of service is playing music.
Mobile Application Development 43
...
• Broadcast Receivers – This component are responsible for receiving
and reacting to broadcasted messages.
• Broadcast can be system generated like the “Low battery”, but it can
also be from other applications running in the background.
• They must inherit BroadcastReceivers base class.
• A broadcast receiver is a component that receives and react to
broadcast announcement.
• For example, you play music on your phone, at that time a pop-up
message may notify about “Battery is Low”,
• So your music player is broadcast receiver, so we can say that any
application which is currently running on your phone can get that
message (independent of their usage).
Mobile Application Development 44
...
• Content Providers – This provides specific set of data from one application
to other applications.
• It is mediator between the application and the database, the database
which is related with application, which contain all stuff require by
application.
• By default, Android runs each application in its own sandbox so that all data
that belongs to an application is totally isolated from other applications on
the system.
• A content provider makes a specific set of the application's data available to
other applications.
• The content providers extend ContentProvider base class. These are used in
conjunction with Content resolver which provide methods for inter process
communication.
• The canonical ContentProvider example in Android is the contacts list—the
list of name, address, and phone information stored in the phone.
Mobile Application Development 45
Thank You!
Mobile Application Development 46