0% found this document useful (0 votes)
50 views25 pages

Mobile App Development Guide

Uploaded by

tarikulislam0175
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)
50 views25 pages

Mobile App Development Guide

Uploaded by

tarikulislam0175
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/ 25

LAB WORK

MOBILE APPLICATION DEVELOPMENT

1. INTRODUCTION TO MOBILE APPLICATIONS

1.1.NATIVE APPLICATIONS AND WEB APPLICATIONS

NATIVE APPLICATIONS

A native application is a software program that is developed for use on a particular platform or
device. Because a native app is built for use on a particular device and its OS, it has the ability to
use device-specific hardware and software.

Native apps can provide optimized performance and take advantage of the latest technology,
such as a GPS, compared to web apps or mobile cloud apps developed to be generic across
multiple systems.

A native mobile app is a smart phone application that is coded in a specific programming
language, such as Objective C for IOS or Java for Android operating systems. Native mobile
apps provide fast performance and a high degree of reliability. They also have access to a
phone's various devices, such as its camera and address book. In addition, users can use some
apps without an internet connection.

However, this type of app is expensive to develop because it is tied to one type of operating
system, forcing the company that creates the app to make duplicate versions that work on other
platforms.

WEB APPLICATIONS

A web application is a software application that runs on a remote server. In most cases, Web
browsers are used to access Web applications, over a network, such as the Internet. Some web
applications are used in intranets, in companies and schools, for example. Web applications are
different from other applications because they do not need to be installed. Some example web
applications are: Facebook (social networking), Flickr (photo sharing), Mibbit(chatting), and
Wikipedia.
Web applications are popular because most computer operating systems have web browsers.
Programmers can easily change a web application. Users do not need to install any new software
to see these changes.

1.2 MOBILE OPERATING SYSTEMS

Mobile operating system is an OS built exclusively for mobile devices such as smart phones,
personal digital assistance, tablet or other embedded mobile OS. Mobile operating systems are
the software that runs mobile devices such as smart phones and tablets.

Eg: Symbian, android, windows mobile, IOS, Blackberry OS.

Functions of Mobile OS:

A mobile OS is responsible for identifying and defining mobile device features and
functions including keypad application, synchronization, email, thumbwheel and text messaging.

The mobile OS is similar to a standard OS.

Eg: Windows, Mac, linux.

But these are relatively simple and light and primarily manage the wireless variations of local
and broad band connection, mobile multimedia and various input methods.

1.3 MOBILE DATABASES

Mobile databases are separate from the main database and can easily be transported to various
places. Even though they are not connected to the main database, they can still communicate
with the database to share and exchange data.

Mobile Database is a database that is transportable, portable and physically separate or detached
from the corporate database server but has the capability to communicate with those servers from
remote sites allowing the sharing of various kinds of data.

With mobile databases, users have access to corporate data on their laptop, PDA, or other
Internet access device that is required for applications at remote sites.

The mobile database includes the following components:

The main system database that stores all the data and is linked to the mobile database.
The mobile database that allows users to view information even while on the move. It shares
information with the main database.

The device that uses the mobile database to access data. This device can be a mobile phone,
laptop etc.

A communication link that allows the transfer of data between the mobile database and the main
database.

Advantages of Mobile Databases


The data in a database can be accessed from anywhere using a mobile database. It
provides wireless database access.

The database systems are synchronized using mobile databases and multiple users can
access the data with seamless delivery process.

Mobile databases require very little support and maintenance.

The mobile database can be synchronized with multiple devices such as mobiles,
computer devices, laptops etc.

Disadvantages of Mobile Databases


The mobile data is less secure than data that is stored in a conventional stationary
database. This presents a security hazard.

The mobile unit that houses a mobile database may frequently lose power because of
limited battery. This should not lead to loss of data in database.

1.4. ANDROID

Android is an open source operating system based on Linux with a Java programming interface
for mobile devices such as Smartphone (Touch Screen Devices who supports Android OS) as
well for Tablets
1.5.ANDROID HISTORY

Initially Google launched a first version of Android platform on Nov 5, 2007 from that onwards
Google released a lot of android versions under a code name, such as Apple Pie, Banana Bread,
Cupcake, Donut, Éclair, Froyo, Gingerbread, Jellybean, Kitkat, Lollipop, Marshmallow, etc. and
made a lot of changes and additions to the android platform

Following table shows the version details of android which is released by Google from 2007 to
till date.
Release Date Version API Level Version Name
September 23, 2008 Android 1.0 1 Apple Pie
February 9, 2009 Android 1.1 2 Banana Bread
April 30, 2009 Android 1.5 3 Cupcake
September 15, 2009 Android 1.6 4 Donut
October 26, 2009 Android 2.0 5
December 3, 2009 Android 2.0.1 6 Eclair
January 12, 2009 Android 2.1 7
May 20, 2010 Android 2.2 8
January 18, 2011 Android 2.2.1 8
Froyo
January 22, 2011 Android 2.2.2 8
November 21, 2011 Android 2.2.3 8
December 6, 2010 Android 2.3 9
February 9, 2011 Android 2.3.1 9
Gingerbread
July 25, 2011 Android 2.3.3 10
September 2, 2011 Android 2.3.4 10
February 22, 2011 Android 3.0.x 11
May 10, 2011 Android 3.1.x 12 Honeycomb
July 15, 2011 Android 3.2.x 13
October 18,2011 Android 4.0 14
October 19, 2011 Android 4.0.1 14 Ice Cream Sandwich
November 28, 2011 Android 4.0.2 14
Release Date Version API Level Version Name
December 16, 2011 Android 4.0.3 15
February 4, 2012 Android 4.0.4 15
July 9, 2012 Android 4.1 16
July 23, 2012 Android 4.1.1 16
October 9, 2012 Android 4.1.2 16
November 13, 2012 Android 4.2 17 Jelly Bean
November 27, 2012 Android 4.2.1 17
February 11, 2013 Android 4.2.2 17
July 24, 2013 Android 4.3 18
October 31, 2013 Android 4.4 19
June 23, 2014 Android 4.4.1, 4.4.2, 4.4.3, 4.4.4 Kitkat
19
October 17, 2014 Android 5.0
21
March 09, 2015 Android 5.1
Lollipop
October 5, 2015 Android 6.0 22
December 7, 2015 Android 6.0.1 23
August 22, 2016 Android 7.0 Marshmallow
23
October 4, 2016 Android 7.1
24
March, 2017 Android 8.0
Nougat
March 7,2018 Android 9.0 25
March 13, 2019 Android 10.0 26 Oreo
27 Pie
28 Q

For each version Google has made a lot of changes and introduced lot of new features due to that
the usage of android in mobile market increased drastically.
1.6. ANDROID FEATURES

Android is a powerful open source operating system which provides a lot of great features, those
are

It’s an open source and we can customize the OS based on our requirements.

It support a connectivity for GSM, CDMA, WIFI, NFC, Bluetooth, etc. for telephony or
data transfer. It will allow us to make or receive a calls / SMS messages and we can send
or retrieve a data across mobile networks

By using WIFI technology we can pair with other devices using apps

Android have a multiple APIs to support a location-based services such as GPS
➢ We can perform all data storage related activities by using light weight database SQLite.

It have a wide range of media supports like AVI, MKV, FLV, 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.

It supports a multi-tasking, we can move from one task window to another and multiple
applications can run simultaneously

It will give a chance to reuse the application components and the replacement of native
applications.

We can access the hardware components like Camera, GPS, and Accelerometer

It has a support for 2D/3D Graphics.

1.7 OSS

Open-source software (OSS) is a type of computer software in which source code is


released under a license in which the copyright holder grants users the rights to study,
change, and distribute the software to anyone and for any purpose. Open-source software
may be developed in a collaborative public manner.

Software for which the original source code is made freely available and may be
redistributed and modified according to the requirement of the user.
Open source software is that by which the source code or the base code is usually
available for modification or enhancement by anyone for reusability and accessibility.

Open source code is the part of software that mostly users don't ever see. Anyone can
manipulate and change a piece of software so that the program or application can work.

Programmers who have access to a computer program source code can improve a
program by adding features to it or fixing parts that don't always work correctly.

Advantages

• Its quality can be easily and greatly improved when its source code is passed around,
tested, and fixed.
• It offers a valuable learning opportunity for programmers. They can apply skills to the
most popular programs available today.
• It can be more secure than proprietary software because bugs are identified and fixed
quickly.
• Since it is in the public domain, and constantly subject to updates, there is little chance it
can become unavailable or quickly outmoded—an important plus for long-term projects.

1.8 OHA


Android was developed by the Open Handset Alliance (OHA), which is led by
Google. The Open Handset Alliance (OHA) is consortium of multiple
companies like Samsung, Sony, Intel and many more to provide a services and
deploy handsets using android platform.

In 2007, Google released a first beta version of the Android Software
Development Kit (SDK) and the first commercial version of Android 1.0 (with
name Alpha), was released in September 2008.

In 2012, Google released another version of android, 4.1 Jelly Bean. It’s an
incremental update and it improved a lot in terms of user interface, functionality
and performance.

In 2014, Google announced another Latest Version, 5.0 Lollipop. In Lollipop
version Google completely revamped the UI by using Material Designs, which is
good for the User Interface as well for the themes related.

All the source code for Android is available free on Git-Hub, Stack overflow and
many more websites. Google publishes most of the code under the Apache
License version 2.0.

1.9 ANDROID VERSIONS AND COMPATIBILITY

Android is designed to run on many different types of devices, from phones to


tablets and televisions. As a developer, the range of devices provides a huge potential
audience for your app. In order for our app to be successful on all these devices, it should
tolerate some feature variability and provide a flexible user interface that adapts to
different screen configurations.

Android is an open source project, any hardware manufacturer can build a device
that runs the Android operating system. Yet, a device is "Android compatible" only if
it can correctly run apps written for the Android execution environment. The exact details
of the Android execution environment are defined by the Android compatibility program
and each device must pass the Compatibility Test Suite (CTS) in order to be considered
compatible.


Android's purpose is to establish an open platform for developers to build innovative
apps.


The Android Compatibility program defines technical details of the Android platform and
provides tools for OEMs to ensure developer applications run on a variety of devices.


The Android SDK provides built-in tools for developers to clearly state the device
features required by their applications.


Google Play shows applications only to those devices that can properly run those
applications.

1.10 ANDROID DEVICES

An Android device is a device that runs on the Android operating system. Android is an
array of software intended for mobile devices that features an operating system, core applications
and middleware. An Android device may be a smartphone, tablet PC, e-book reader or any type
of mobile device that requires an OS.
Android is developed by the Open Handset Alliance, which is led by Google. Some of
the well-known Android device manufacturers include Acer, HTC, Samsung, LG, Sony Ericsson
and Motorola.

Popular Android devices include smartphones, tablets and e-readers. The Android OS is
also built into a limited number of other devices, such as netbooks, portable music players, the
Binatone iHome Phone and Odroid handheld game consoles.

Android device developers and programmers can find information at the Android website, which
offers an Android software development kit.

Within a short period, the Android platform became so popular that it surpassed Windows
Mobile and Symbian for a number of applications. Various mobile device manufacturers
embraced the Android platform due to its overwhelming popularity. The reasons behind this
success are as follows:

Cutting-edge technology offered by Google

Extremely user friendly platform

Can be used in smartphones as well as tablets

Any user can do modifications to the platform as the Android SDK is open to
users

Availability of huge volume of applications

1.11 PREREQUISITES:

Android programming is based on Java programming language so if you have basic


understanding on Java programming then it will be a fun to learn Android application
development.

1.12 ANDROID DEVELOPMENT ENVIRONMENT SETUP

The Android SDK is compatible with Windows, Mac and Linux operating systems to build
android applications based on our requirements.

We can setup android development environment using following two ways

Setup Eclipse IDE Manually


Android Studio

Initially Google supported a Manual Eclipse IDE Setup for android development environment
by downloading required components like Eclipse IDE, Android SDK, Java Development Kit
(JDK) etc. from official site. Afterwards Google introduced a component called Android Studio
to make environment setup process simple.

By using Android Studio bundle we can easily setup android development environment in any
operating system to implement android applications.

Android Studio is the combination of following components to allow users to implement


android applications.

Eclipse IDE

Android SDK

Android Virtual Device

Eclipse Plugin

By downloading Android Studio directly from Google website to setup we can easily setup
development environment.

ANDROID STUDIO INSTALLATION FOR DEVELOPMENT ENVIRONMENT

Initially to setup an android development environment in our system we need to install following
components manually by downloading from different sites.

Eclipse IDE

Eclipse Plugin

Android SDK
To make android development environment setup process simple Google introduced a new
android IDE called Android Studio. The Android Studio will contain all the required
components like Eclipse IDE, Eclipse Plugin and Android SDK so we don’t need to download
the components separately.

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.

We can download latest version of Android Studio from following URL.

https://developer.android.com

Download Android Studio:

Download the latest version of Android Studio from above URL and launch Android
Studio.exe file by double clicking on it.

The initial android studio setup screen will open like as shown below in that click Next to
continue for further steps of environment setup.
Now we need to select a required components to setup an android environment. Here we
selected all three components (Android Studio, Android SDK and Android Virtual Device)
and click Next like as shown below.

Now we need to agree the License agreements to proceed further, click on I Agree button like a
shown below.
Now we need to specify the local machine drive location to install Android Studio and Android
SDK. After selecting the location path to install required components, click Next like as shown
below.

Now select the start menu folder to create a shortcuts for android studio and click Install like as
shown below.
Once we click Install button the installation process will start and click Next after completion of
installation like as shown below.

After that it will show installation completion wizard in that click Finish to launch android
studio like as shown below.
While launching Android Studio it will give you an option to import settings from previous
version of studio. In case if you don’t have any previous version, select second option and click
OK like as shown below.

Now android studio will open a welcome wizard window in that click Next to validate our
current Android SDK and development environment setup like as shown below.
Now select a Standard installation type and click Next to install a common settings and options
like as shown below.

Now verify settings and click Finish to complete android studio setup process like as shown
below.
After completion of required components installation click on Finish like as shown below.

After completion of all required components installation we will be able to see Android Studio
welcome window like as shown below.
This is how we can setup android development environment on windows machine which is
having windows 10 operating system using android studio IDE.

1.13 ANDROID ARCHITECTURE:

Android architecture is a software stack of components to support a mobile device needs.


Android software stack contains a Linux Kernel, collection of c/c++ libraries which is exposed
through an application framework services, runtime and application.

Following are main components of android architecture those are

Applications

Android Framework

Android Runtime

Platform Libraries

Linux Kernel

In these components Linux Kernel is the main component in android to provide its operating
system functions to mobile and Dalvik Virutal Machine (DVM) which is responsible for
running a mobile application.
Following is the pictorial representation of android architecture with different components.
APPLICATIONS

The top layer of android architecture is Applications. The native and third party applications like
contacts, email, music, gallery, clock, games, etc. whatever we will built those will be installed
on this layer only.

The application layer runs within the Android run time using the classes and services made
available from the application framework.

1.14 ANDROID RUNTIME

Android Runtime environment is an important part of Android rather than an internal part and it
contains a components like core libraries and the Dalvik virtual machine. The Android run
time is the engine that powers our applications along with the libraries and it forms the basis for
the application framework.

1.15 DALVIK VIRTUAL MACHINE (DVM)

DVM is a register-based virtual machine like Java Virtual Machine (JVM). It is specially
designed and optimized for android to ensure that a device can run multiple instances efficiently.
It relies on the Linux kernel for threading and low-level memory management.

The core libraries in android runtime will enable us to implement an android applications using standard
JAVA programming language.

1.16 APPLICATION FRAMEWORK

The Application Framework provides the classes used to create an Android application. It also
provides a generic abstraction for hardware access and manages the user interface and
application resources. It basically provides the services through which we can create the
particular class and make that class helpful for the Applications creation.

The application framework includes services like telephony service, location services,
notification manager, NFC service, view system, etc. which we can use for application
development as per our requirements.
Platform Libraries

The Platform Libraries includes various C/C++ core libraries and Java based libraries such as
SSL, libc, Graphics, SQLite, Webkit, Media, Surface Manger, OpenGL etc. to provide a support
for android development.

Following are the summary details of some core android libraries available for android
development.

Media library for playing and recording an audio and video formats

The Surface manager library to provide a display management

SGL and OpenGL Graphics libraries for 2D and 3D graphics

SQLite is for database support and FreeType for font support

Web-Kit for web browser support and SSL for Internet security.

1.17 LINUX KERNEL

Linux Kernel is a bottom layer and heart of the android architecture. It manage all the drivers
such as display drivers, camera drivers, Bluetooth drivers, audio drivers, memory drivers, etc.
which are mainly required for the android device during the runtime.

The Linux Kernel will provides an abstraction layer between the device hardware and the
remainder of the stack. It is responsible for memory management, power management, device
management, resource access, etc. Generally to build an application for Android we should have
Java Development Kit (JDK), Android SDK, and a development environment.
1.18 ANDROID EMULATOR

The Android SDK includes a virtual mobile device emulator that runs on your computer. The
emulator lets you prototype, develop and test Android applications without using a physical
device. 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.

1.19.ANDROID - APPLICATION COMPONENTS

Application components are the essential building blocks of an Android application. These
components are loosely coupled by the application manifest file AndroidManifest.xml that
describes each component of the application and how they interact.

There are following four main components that can be used within an Android application.

Sr.NoComponents & Description


Activities
1
They dictate the UI and handle the user interaction to the smart phone screen.
Services
2
They handle background processing associated with an application.
Broadcast Receivers
3
They handle communication between Android OS and applications.
Content Providers
4
They handle data and database management issues.
ACTIVITIES

An activity represents a single screen with a user interface,in-short Activity performs actions on
the screen. For example, an email application might have one activity that shows a list of new
emails, another activity to compose an email, and another activity for reading emails. If an
application has more than one activity, then one of them should be marked as the activity that is
presented when the application is launched.

An activity is implemented as a subclass of Activity class as follows −

public class MainActivity extends Activity {

SERVICES

A service is a component that runs in the background to perform long-running operations. For
example, a service might play music in the background while the user is in a different
application, or it might fetch data over the network without blocking user interaction with an
activity.

A service is implemented as a subclass of Service class as follows −

public class MyService extends Service {

BROADCAST RECEIVERS

Broadcast Receivers simply respond to broadcast messages from other applications or from the
system. For example, applications can also initiate broadcasts to let other applications know that
some data has been downloaded to the device and is available for them to use, so this is
broadcast receiver who will intercept this communication and will initiate appropriate action.

A broadcast receiver is implemented as a subclass of BroadcastReceiver class and each


message is broadcaster as an Intent object.
public class MyReceiver extends BroadcastReceiver {

public void onReceive(context,intent){}

A service is implemented as a subclass of Service class as follows −

public class MyService extends Service {

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

S.NoComponents & Description


Fragments
1
Represents a portion of user interface in an Activity.
Views
2
UI elements that are drawn on-screen including buttons, lists forms etc.
Layouts
3
View hierarchies that control screen format and appearance of the views.
Intents
4
Messages wiring components together.
Resources
5
External elements, such as strings, constants and drawable pictures.
Manifest
6
Configuration file for the application.

You might also like