KEMBAR78
Mobile Application Development - I | PDF | Mobile App | Android (Operating System)
0% found this document useful (0 votes)
66 views63 pages

Mobile Application Development - I

The document provides an overview of mobile application development, focusing on mobile computing, its characteristics, and the differences between mobile software and applications. It discusses various mobile application platforms, including Android and iOS, and highlights the impact of mobile apps across different industries such as banking, education, and healthcare. Additionally, it covers the architecture of Android, its development environment, and key components involved in building mobile applications.

Uploaded by

geziemulu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views63 pages

Mobile Application Development - I

The document provides an overview of mobile application development, focusing on mobile computing, its characteristics, and the differences between mobile software and applications. It discusses various mobile application platforms, including Android and iOS, and highlights the impact of mobile apps across different industries such as banking, education, and healthcare. Additionally, it covers the architecture of Android, its development environment, and key components involved in building mobile applications.

Uploaded by

geziemulu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Mobile Application Development

Mobile Application Development 1


Introduction to mobile computing

 Mobile computing's:- are devices that can be easily moveable and their
computing capabilities may be used while they are being moved.
 Examples smart phone, Tablet.

 There are many things that a mobile computing can do that a fixed computing
cannot do.

 These added functionalities are the reason for separately characterizing mobile
computing systems.

Mobile Application Development 2


Characteristics of mobile computing

 User mobility: User should be able to move from one physical location to
another location without losing service.
 Network mobility: devices should support using of the same service while
move from one network to another network.
 Device mobility: User should be able to move from one device to another
and use same service.
 Service mobility: User should be able to move from one service to another.
 Host mobility: The user should be either a client or server.
 The mobile computing functions can be logically divided into following
major segments.

Mobile Application Development 3


Con’t…
1) User with device: The user device, this could be fixed device like desktop

computer in office or a portable device like mobile phone. E.g. Laptop


Computers, Desktop Computers, Fixed Telephones, Mobile Phones, Digital TV
with set top box, palmtop computers, pocket PCs, two-way pagers, handheld
terminals etc.

2) Network: Whenever a user is mobile, he will be using different networks at


different places at different time e.g. GSM, CDMA, Ethernet, Wireless LAN, and
Bluetooth etc.

3) Gateways: This is required to interface different transport bearers.

These gateways convert one specific transport bearer to the other.

Mobile Application Development 4


Elements of mobile computing

1. Mobile Hardware: The hardware is the physical parts of the mobile


computing that supporting for wireless connectivity and movability.
2. Mobile Software: includes operating system and applications that can run
mobile devices.
• It may be Android or iOS and different applications that are running on a
device.
• Discuss about Mobile Software vs mobile app?
3. Mobile Communication: is the communication infrastructure set in place,
including wireless network infrastructure, protocols, data and portals
necessary to ensure seamless connectivity.

Mobile Application Development 5


Mobile Software Vs Mobile application

 Mobile Software: refers to any software that runs on mobile devices, including
smartphones and tablets.

 It can include mobile applications (apps), mobile operating systems.

 Mobile software manage device resources, connectivity, and other system


functions.

 Mobile Application: is a specific type of mobile software designed to perform a


particular function or set of functions for the end user.

 Mobile applications can be native (developed for a specific platform), web-based


(accessed through a mobile browser), or hybrid (a combination of both).

 Mobile Apps example: Facebook,Instagram,Gaming etc.


Mobile Application Development 6
Mobile Applications

 Mobile application are apps that can run on mobile devices such as tablets,
smart phones, Personal Digital Assistants (PDA) etc.

 Because as the revolution in the consumer space toward mobility, most analysts
have identified that mobile devices are the major gateways to Internet as
compared to desktop browsers.

 Mobile apps are shaping user experiences and are providing real-time
information and offer more engaging experiences for the users.

 Mobility based digital strategy considers various things such as user


experience, performance, interactivity, device form factors, device
limitations, location needs and personalization.
Mobile Application Development 7
Impact of Mobile Apps on various domains

 Banking industry: Mobile apps enable convenient ways to carry out


transactions such as to check balances, transfer funds, pay bills, and
manage their finances remotely.

 Education and Productivity: Educational apps provide personalized


learning experiences, access to digital content, and collaborative tools for
students and teachers.

 Entertainment and Media: Mobile apps have revolutionized content


consumption, allowing users to stream videos, music, games, and books on-
the-go.

 Healthcare: Mobile apps can easily connect patients, doctors and


insurance providers as well as provide wellness management solutions.

Mobile Application Development 8


Mobile application platforms

 Android: Android offers a unified approach to application


development for mobile devices.

 These android applications should be able to run on different


devices powered by Android.

 iOS: The development on iOS is using C programming language


and the applications run on devices powered by apple.

 iOS supports many features such as iMessage, iCloud, Siri and the
development requirements iOS SDK (Xcode), iOS Simulator,
Xcode IDE.

Mobile Application Development 9


Difference between iOS and Android?

 Android is backed by Google.

 iOS is backed by Apple.

 Anyone can build an Android device, and it is designed to run on a variety of


different hardware.

 iOS is designed to run only on a specific set of Apple devices.

 Android is based on the Linux kernel, and Google releases the source code for
Android as open source.

 Like Apple, Google provides some native tools for Android development.

Mobile Application Development 10


What is Mobile OS?

 A software platform on top of which other apps can run on.


 Experienced a 3 phase evolution
 PC oriented, Embedded System Oriented and Smart-phone oriented evolution.
 PC-Oriented: includes traditional personal computers (desktops and laptops)
designed for general-purpose computing tasks.
 Embedded System-Oriented: are specialized computing systems that perform
dedicated functions within larger systems.
 They are often found in appliances, vehicles, industrial machines, and consumer electronics.
 Smartphone-Oriented: Mobile devices focused on communication and versatile
applications with user-friendly interfaces.
 Some of the mobile operating systems are:
 iOS:- Developed by Apple inc. and distributed exclusively for Apple Hardware.
 Windows Phone:- A proprietary software Smartphone OS developed by Microsoft.
 Android:- Developed by Open Handset Alliance (OHA), Led by Google.

Mobile Application Development 11


Mobile application development platforms

Android Studio
 Android is an open source and Linux-based Operating System for mobile
devices such as smartphones and tablet computers.
 Android is a mobile operating system currently developed by Google.
 Android Studio is the official Integrated Development Environment (IDE)
for Android App development.
 These android applications should be able to run on different devices
powered by Android.

Mobile Application Development 12


Mobile application development platforms

Xcode
 The primary IDE for iOS development, provided by Apple.

 It Includes a suite of tools for building, testing, and debugging iOS apps and

the applications run on devices powered by apple.

 It uses swift programing language.

Mobile Application Development 13


Mobile application development platforms

Flutter
 Flutter is an open source framework which is used to build an

application’s for multiple platforms with a single codebase.

 Flutter now supports application development platforms such as: iOS,

Android, web, Windows, MacOS, and Linux.

 It uses Dart programming language and provides a rich set of pre-

designed widgets, tools, and frameworks to facilitate fast and efficient

development.

Mobile Application Development 14


Mobile application development platforms

React Native
 React Native is an open-source framework developed by Facebook for

building mobile applications using JavaScript and React.

 It allows developers to create mobile apps for iOS and Android using a

single codebase.

 It combines the best parts of native development with React, a JavaScript

library for building user interfaces.

Mobile Application Development 15


Android Development Environment

 Android offers a unified approach to application development for mobile


devices.

 These android applications should be able to run on different devices


powered by Android.

 Initially Google launched a first version of Android platform onwards Google


released a lot of android versions

Mobile Application Development 16


Android versions

 Each version Focused on enhancing security, performance, battery life,


and introducing new user interface elements and functionality.
 The latest version of android is 14.0, which was released in October 4,2023.

Icon Version Name API


level
Android Versions 4.1 – 4.3 Jelly Bean 16-18

Android Version 4.4 KitKat 19, 20

Android Versions 5.0 – 5.1 Lollipop 21, 22

Android Version 6.0 Marshmallow 23

– 7.1Application Development
Android Versions 7.0Mobile Nougat 24, 25 17
Android versions

Icon Version Name API level


26, 27
Android Versions 8.0 – 8.1 Oreo

Android Version 9 Pie 28

Android Version 10 Android 10 29

Android Version 11 Android 11 30

Android Version 12 Android 12 31, 32

Android Version 13 Android 13 33

Android Version 14 Android 14 34


Mobile Application Development 18
API(Application Programming Interface)

 API a set of development tools, protocols, and libraries to build applications


for the Android operating system.

 These APIs allows to interact with the underlying hardware and software of
Android devices.

 API Level: Each version of the Android operating system is associated with a
specific integer value called an API level.

 This integer value uniquely identifies the framework API revision offered by a
version of the Android platform.

Mobile Application Development 19


Why Android ?

Mobile Application Development 20


Features of android development environment

 It support a connectivity for GSM, CDMA, WIFI, Bluetooth, etc.

 Support a location-based services such as GPS.

 Storage: SQLite, a lightweight relational database management system.

 Used for data storage purposes.

 Multi-Language: Supports single direction and bi-directional text.

 Multi-tasking: User can jump from one task to another and same time various
application can run simultaneously.

 Beautiful UI: Android OS basic screen provides a beautiful and intuitive user
interface.

Mobile Application Development 21


Features of android development environment

 It have a wide range of media supports like AVI, MKV, MPEG4 etc. to play or

record variety of audio / video and having a different image formats like JPEG,

PNG, GIF, BMP, MP3, etc.

 It has an extensive support for multimedia hardware control to perform playback

or recording using camera and microphone.

 It has an integrated open source webkit layout based web browser to support

HTML5, CSS3.

 Messaging: SMS and MMS.

Mobile Application Development 22


Android Applications

 Android applications are usually developed in the Java language using


the Android Software Development Kit.

 There are many android applications in the market. The top categories
are:

Mobile Application Development 23


Android - Architecture

 Android is a software stack.


 Android software stack is categorized into five parts.

Mobile Application Development 24


Linux Kernel

 In android the operating system is Linux Kernel.


 It is the heart of android architecture that exists at the root of android architecture.
 Linux kernel is responsible for device drivers, power management, memory
management, device management and resource access.
Functions of Linux Kernel/ Operating System
 Memory Management: Allocate a memory to a new file, Free the memory when a
specific file is deleted etc.
 Power Management: providing power to various devices like Bluetooth, camera etc.
 Resource Management: It provides resources to each process, thus providing the ability
to do multiple operations at the same time. i.e. Surfing Internet, Listening Songs etc.
 Driver Management: It handles installation of various drivers

Mobile Application Development 25


Middle Ware:

1. Native Applications/Libraries:
 Just by using Java we cannot interact with native applications.
 (Here native are specific to hardware and operating system).
 Thus we need the support of native libraries for interacting with such low level media
components.
 On the top of linux kernel, there are Native libraries such as WebKit, OpenGL,
FreeType, SQLite, Media, C runtime library (libc) etc.
 The WebKit library is responsible for browser support
 SQLite is for relational database
 FreeType for font support
 Media for playing and recording audio and video formats.

Mobile Application Development 26


Con’t…
2. Application Framework:
 The android framework is the set of API’s that allow developers to quickly and easily
write apps for android phones.
 Android framework includes Android API's such as UI (User Interface), telephony,
resources, locations, Content Providers (data) and package managers.
 User Interface (UI): This API provides classes and methods for building and managing
the user interface, including views, layouts, menus, and dialogs.
 Telephony: The telephony API allows an app to access and control phone-related
features, such as making and receiving calls, managing SMS/MMS messages, and
retrieving network information.
 Resources: The resources API provides access to various resources, such as strings,
images, layouts, and configurations, which are stored separately from the app's code.

Mobile Application Development 27


Con’t…
 Location: Allows an app to access the device's location information.
 Including GPS, network-based location, and other location-related services.
 Content Providers: a way for apps to share data with other apps.
 It is a standard interface for querying, modifying, and managing data.
 Package Manager: Provides information about the packages installed on the device.
 allowing an app to query and interact with other installed applications.
 It provides a lot of classes and interfaces for android app development.
 App developers are allowed to make use of these services.
3. Android Runtime:
 It comprises of Dalvik Virtual Machine and Core Libraries which is responsible to
run android application.
 DVM is like JVM but it is optimized for mobile devices.
 It consumes less memory and provides fast performance.

Mobile Application Development 28


Android Application Components

1. Activities: Activity is also known as Widgets.


 Activity represents a single screen with a user interface.
 It is an individual user interface screen in an Android Application
where visual elements called Views.
 It interacts with the user to do only one thing such as unlock screen, dial
a phone, etc.
 If new activity starts, then previous activity is stopped, but the data is
preserved.
 An application consists of multiple activities.
 For example: an email application has one activity to display a list of
new emails, another activity is to compose email, reading email.

Mobile Application Development 29


Con’t…

2. Services:
 Services performs the action without user interaction in the background,
but does not get initiated without user invocation.

 It does not require a user interface.

 It is an android application component which runs in a background and has


no visual UI.

 It is used to perform the processing part of your application in the


background.

 For example: music player application. When the music station is


playing the song, the user can open another application and the song
plays in the background.

Mobile Application Development 30


Con’t…

3. Broadcast Receiver:

 Broadcast receivers are used to receive messages.

 They respond to broadcast messages from other applications.

 Broadcast Receivers handle communication between Android OS and applications.

For example: The notification that the device battery is low, the sign of earphone as soon as

you plug the headset.

 Although broadcast receivers don’t display a user interface.

 They may create a status bar notification to alert the user when a broadcast event occurs.

Mobile Application Development 31


Con’t….

4. Content Provider:

 Content providers are used to share data between the applications.

 In android the data cannot be shared directly between two applications.

 Help to provide a flexible way to make data available across applications.

 It manages common data based on permissions.

 It manages the data which is being shared by more than one application.

 Data abstraction, data sharing an data security are the main functions of
content provider.

Mobile Application Development 32


Con’t…

5. Intent:

 Is a message which allows components to request activities from other


components.

• There are two types of Intents:

1.ExplicitIntents

2.ImplicitIntents

1. ExplicitIntents are used for application's internal communications.

2. ImplicitIntents means sending a message to the Android system to find a


suitable activity that can be responded to the intent.

Mobile Application Development 33


Con’t…

 Activities: They dictate the UI and handle the user interaction to the smart
phone screen.

 Services: They handle background processing associated with an application.

 Broadcast Receivers: They handle communication between Android OS


and applications.

 Content Providers: They handle data and database management issues.

Mobile Application Development 34


Additional Components

 There are additional components which will be used in the construction of above-

mentioned entities, their logic, and wiring between them.

 These components are:

 Fragments: Represent a behavior or a portion of user interface in an Activity.

 Views: UI elements that are drawn onscreen including buttons, lists forms etc.

 Layouts: View hierarchies that control screen format and appearance of the views.

 Intents: Messages wiring components together.

 Resources: External elements, such as strings, constants and drawable pictures.

 Manifest: Configuration file for the application.

Mobile Application Development 35


Application Framework

 Activity Manager android.activity


 Manages the activity life cycle of applications

 Content Providers android.provider


 Manage the data sharing between applications

 Telephony Manager android.telephony


 Manages all voice calls.

 Location Manager android.location


 Location management, using GPS or cell tower.

 Resource Manager
 Manage the various types of resources we use in our Application.

Mobile Application Development 36


Libraries

 OpenGL ES android.opengl
 The OpenGL ES is a 3D graphics library.

 It allows developers to create highly optimized and visually impressive graphics

 example: games, augmented reality, and other graphics

 SQLite android.database.sqlite
 Contains the SQLite database management classes.

 It allows you to store and perform complex queries and data manipulations.

 Media Framework: allow Android applications to access and manipulate multimedia content.

 SSL: used for internet security (Secure Socket Layer)

 WebKit: open source browser engine

Mobile Application Development 37


Android Platform

 Android is an open-source mobile app development platform.

 Kotlin or Java are Programming Languages used in Developing Android


Applications.

 The key features supported by Android are SQLite based light-weight


storage, SMS and MMS messaging, multi-lingual support, mobile
browser, multitasking, voice features, external storage etc.

Mobile Application Development 38


Android Application Development Requirements

 Android SDK libraries

 Emulator or real phone

 Android testing APIs.

 Finally, we can deploy Android apps to Google Play store.

Mobile Application Development 39


IDE and SDK

• IDE: is a software application that provides comprehensive facilities for

software development such as Code Editor, Compiler, GUI Builder,

Debugger etc. Example: Android Studio, Flutter, Eclipse and Visual Studio.

• It integrates various tools and functionalities into a single GUI.

• SDK: provides a comprehensive set of tools and libraries necessary for

developing applications for a specific platform.

Mobile Application Development 40


IDE and SDK
Aspect IDE SDK

To provide tools, libraries, and


To provide an integrated environment for
Purpose documentation for developing
coding, debugging, and building applications.
applications on a specific platform.

Code editor, compiler, debugger, version Libraires, documentation,emulators,


Components
control, GUI builder. platform- specific APIs.

Used throughout the software development Used primarily to provide platform-


Usage lifecycle for writing, testing, and debugging specific functionality and tools
code. needed to develop applications

Examples Android Studio, Eclipse, Visual Studio Android SDK, iOS SDK, JDK,

Can be used within an IDE to


Often integrates SDKs for additional
Integration provide platform-specific
functionality.
capabilities
Mobile Application Development 41
Advantages of Android

 Android is largely supported by Google.

 It allows you to use various services of Google.

 Android is an open source and runs on mobile devices, tablets etc.

 It is multitasking that means you can run many applications at the same time.

For example, you can browse Facebook while listening the song.

Mobile Application Development 43


Con’t…

 The Android operating system is available on mobile phones from various

manufacturers like Samsung, Motorola, HTC, Sony Ericsson etc.

 Using Android phone, you can easily check e-mail from Gmail if your

Gmail account is integrated with Google Services.

 User can easily access a variety of settings quickly and easily.

Mobile Application Development 44


Disadvantages of Android

 Android requires continuous Internet connection if you are using Google


services.

 Android shows error & forces to close the large apps/games, which is very
annoying.

 It takes large amount of mobile data if a large number of background processes


are running.

 It increases the usage of RAM and decreases battery performance when


many processes are running in the background.

Mobile Application Development 45


Mobile Application Architecture

Mobile Application Development 46


Mobile Application Architecture

 Presentation layer: This layer contains the user oriented functionality


responsible for managing user interaction with the system.

 This layer is responsible for the interaction of the app with the user.

 It includes components like screens, views, layouts, and UI controls.

 The UI layer handles user input, gestures, and events, and communicates
with the business logic layer.

 Business layer: This layer implements the core functionality of the system,
and encapsulates the relevant business logic.

Mobile Application Development 47


Mobile Application Architecture

 Contains the core functionality and processing logic of the app.

 It handles data management, business rules, and application-specific


algorithms.

 It communicates with the data layer and the presentation layer.

 Data layer: This layer is responsible for managing the app's data,
including storage, retrieval, and synchronization.

 It may include local data storage (e.g., databases, caches) and remote data
sources (e.g., APIs, web services).

 Provides an abstraction that the business logic layer to work with data
without worrying about the implementation details.
Mobile Application Development 48
Getting Started
 In order to write an Android application, we need a Java Development Kit (JDK),
Java Runtime Environment (JRE) and development environment.
 The common Android application development environments are Android Studio,
Eclipse, flutter etc.
 But officially Android Studio is the recommended IDE for developing Android
Projects.
 Android Studio is a very useful tool made by Google for all Android Developers.
 Android Studio includes everything you need to begin developing Android apps.
 Included in the download kit, are the Software Development Kit (SDK), with all the
Android libraries we may need, and the infrastructure to download the many Android
emulator instances, so that we can initially run our application, without needing a real
device.

Mobile Application Development 49


Con’t…
 Android Emulator is used to run, debug and test the android application.
 If you don't have the real device, it can be the best way to run, debug and test the
application. It uses an open-source processor emulator technology called QEMU.
The emulator tool enables you to start the emulator from the command line.
 You need to write: emulator -avd <AVD NAME>
 In case of Eclipse IDE, you can create AVD by Window menuAVD Manager
 New.
 If you want to test the android applications using a real device, unlock the
developer’s option in Android as follows: Go to SettingsGeneralAbout
Phone. Then scroll and select Software InformationBuild Number. Now
quickly tap on “Build Number” seven times and you will see the message “You
are now a developer”.

Mobile Application Development 50


Android Studio Installation

 Install JDK and JRE in your system

 Launch Android Studio .exe. If the JDK is not detected automatically you need to
mention its path explicitly.

 Proceed further to include all the components

 Click Next. Until you complete the installation.

Mobile Application Development 51


Building your first app (Hello World)

• Step1: Start a new Android Studio Project


• Step2: Fill Application Name and Package Name and click next

Mobile Application Development 52


Con’t…

Step3: Select Phone and Tablet in Target Android Device and Proceed.

Mobile Application Development 53


Con’t…

Step4: Select Empty Activity and click Next.

• Step5 Click next and Finish.


Mobile Application Development 54
Running Application

 In Android Studio, click the app module in the Project window and then
select Run>Run ‘app’(or Run Icon in the toolbar). In the Select
Deployment Target window, select your device and click ok.
 Output

Mobile Application Development 55


Android Project Structure

 When you start a new project, Android Studio creates the necessary structure for
all your files and makes them visible in the project window on the left side of the
IDE click ViewTool WindowsProject. By default, Android Studio displays our
project files in the Android view.

Mobile Application Development 56


Android App Module:

 When you create a new project, the default module name is “app”.
 A module is a collection of source files and build settings that allow you to
divide your project into discrete units of functionality.
 Your Project can have one or more modules and one module may use another
module as a dependency. Each module can be independently built, tested and
debugged.
 Module provides a container for your app’s source code, resource files, and app
level settings such as the module-level build file and Android Manifest file.
 To add a new module to your project click FileNewNew Module.
 In the create new module window, Android Studio offers different app modules
such as Phone & Tablet, Android Wear, Android TV and Glass Modules.
 Each module provides essential files and some code templates that are
appropriate for the corresponding app or device type.

Mobile Application Development 57


Android Manifest.xml:

 Android Manifest.xml describes the fundamental characteristics of an app and


each of its components. It works as an interface between your android OS and
your application, so if you forget to declare your components in this file then it
will not be considered by the OS.
 The default AndroidManifest.xml files looks like this:

Mobile Application Development 58


Con’t…

Mobile Application Development 59


Android Java

 It contains the Java source code files separated by package names and
JUnit test code. All the Activity classes are stored inside java folder. For
e.g. The Activity class called MainActivity.java is stored in this directory
under the package name you mentioned in the wizard.

Mobile Application Development 60


Android Resource (res)
 It contains all non-code resources, such as xml layouts, UI strings and
bitmap images, divided into corresponding sub-directories. Some of the
examples of resource types are:
 Animation Resources- defines predetermined animations. Animations are
saved in res/anim/ and accessed from the R.anim class. Frame animations are
saved in res/drawable/ and accessed from the R.drawable class.
 Color State List Resource-it defines color resources that changes based on
the view state. It is saved in res/color/ and accessed from the R.color class
 Drawable Resource- defines various graphics with citmaps or XML. It is
saved in res/drawable/ and accessed from the R.drawable class.

Mobile Application Development 61


Con’t…
 Layout Resource- defines the layout for your application UI. It is saved in
res/layout/ and accessed from the R.layout class.
 Menu Resource- defines the contents of your application menus. It is
saved in res/menu/ and accessed from the R.menu class.
 String Resource- defines string, string arrays and plurals (and include
string formatting and styling). It is saved in res/values/ and accessed from
the R.string, R.array and R.plurals classes.
 Style Resource- defines the look and format for UI elements. It is saved in
res/values/ and accessed from the R.style class.

Mobile Application Development 62


Android Strings

 A string resource provides text strings for your application with optional
text styling and formatting.
 Types of resources that can provide your application with strings:
 String: XML resource that provides a single string.
 String Array: XML resource that provides an array of strings.
 Android Styles
 A style resource defines the format and look for a UI. It can specify
properties such as height, padding, font color, font size, background color
etc. Styles in Android share a similar philosophy to cascading style
sheets in web design i.e they allow you to separate the design from the
content.
Mobile Application Development 63
THANKS!
Any questions?

Mobile Application Development 64

You might also like