Mobile Application Development
Unit 1-
Androids And its Tools
04 marks
By : Abhijeet Sir
Gramin Technical & Management Campus
Nanded
BY: Abhijeet N Kurulekar
INTRODUCTION TO ANDROID
OPERATING SYSTEM
Nowadays, most popular used mobile Operating System (OS) is
Android. Android is an open source and Linux-based operating
system for mobile devices such as smart phones and tablet
computers.
Android was founded in Palo Alto of California, U.S. by Andy
Rubin, Rich Miner, Nick Sears and Chris White during 2003.
After it was acquired by Google in 2005.
BY: Abhijeet N Kurulekar
WHAT IS ANDROID?
Android is a mobile operating system developed by Google,
based
on the Linux kernel and designed primarily for touch screen
mobile devices such as smart phones and tablets.
The Android is a powerful Operating System (OS) and it
supports large number of applications (apps) in smart
phones. These applications are more comfortable and
advanced for the users.
BY: Abhijeet N Kurulekar
WHAT IS ANDROID?
The hardware that supports android software is based on
ARM
(Advanced RISC machine) architecture platform.
The android is an open source operating system means that
it is free and any one can use it.
(RISC Reduced Instruction Set Computer)
BY: Abhijeet N Kurulekar
Android was unveiled during 2007
along with the founding of the Open Handset Alliance
(OHA).
A mobile app is a program designed to run on smart phones,
tablet computers and other mobile Devices.
BY: Abhijeet N Kurulekar
Introduction to Android
• Android is an OS based on Linux with a Java programming
interface. It is a comprehensive open source platform designed
for mobile devices.
• First beta version of Android Software Development Kit (SDK)
was released by Google in 2007 where as first commercial
version, Android 1.0, was released in September 2008
Features of Android
• Beautiful UI, Connectivity, Storage, Media support, Messaging,
Web browser, Multi-touch, Multi-tasking, Resizable widgets,
Multi-Language, GCM, Wi-Fi Direct, Android Beam
BY: Abhijeet N Kurulekar
Introduction to Android
Android Applications
• Android applications are usually developed in the Java language
using the Android Software Development Kit.
• Once developed, Android applications can be packaged easily and
sold out either through a store such as Google Play, SlideME, Opera
Mobile Store, Mobango, F-droid and the Amazon Appstore.
BY: Abhijeet N Kurulekar
Mobile Operating Systems
• A mobile OS is an operating system for smartphones, tablets, PDAs, or other mobile devices.
• Mobile OSs combine features of a personal computer OS with other features useful for mobile or
handheld use; usually including, and most of the following considered essential in modern mobile
systems;
•
touchscreen, cellular, Bluetooth, Wi-Fi, GPS mobile navigation, camera, video camera, speech
recognition, voice recorder, music player, etc.
Some Current software platforms
• Android (based on the Linux Kernel) is from Google Inc.
• CyanogenMod and Cyanogen OS are based on the open source Android Open Source
Project(AOSP).
• Fire OS is an operating system launched by Amazon based on Google's AOSP.
• iOS (previously known as iPhone OS) is from Apple Inc.
• Windows Phone (Soon to be Windows 10 Mobile) is from Microsoft.
• BlackBerry 10 (based on the QNX OS) is from BlackBerry.
• Firefox OS is from Mozilla.
BY: Abhijeet N Kurulekar
CATEGORIES OF ANDROID APPLICATIONS
BY: Abhijeet N Kurulekar
ANDROID OS VERSIONS
BY: Abhijeet N Kurulekar
BY: Abhijeet N Kurulekar
BY: Abhijeet N Kurulekar
BY: Abhijeet N Kurulekar
BY: Abhijeet N Kurulekar
OPEN HANDSET ALLIANCE (OHA)
In November 2007 Google formed Open Handset Alliance
(OHA) in order to develop an open source software platform
for use in mobile devices.
The OHA is the group that is in charge of the Android smart
phones operating system.
The OHA is the business alliance that consists of 47 companies
(like Google, HTC, LG Electronics, Motorola, T-Mobile,
Samsung Electronics and so on) for developing open standard
platform for mobile devices.
BY: Abhijeet N Kurulekar
BY: Abhijeet N Kurulekar
The primary objective of these companies is to developed
open standards for mobile devices. The members of OHA
include handset manufactures, chip makers, commercialization
companies, software companies and mobile operators/users.
The goal of the Open Handset Alliance (OHA) is to create
mobility without borders or walls where mobile devices and
mobile applications all work together to achieve a single goal
ie, providing users with the service and applications that they
want and need.
BY: Abhijeet N Kurulekar
Android Ecosystem
To learn about Android operating system and develop Android
applications, it is very important for to understand the entire ecosystem of
Android and the stakeholders of Android ecosystem.
The stakeholders are the consumers that own Android devices. But there
are others as well explained below:
1. Google develops android.
2. OEMs (Original Equipment Manufacturers) manufacture the hardware,
and as well the custom application components.
.
. BY: Abhijeet N Kurulekar
Android Ecosystem
. BY: Abhijeet N Kurulekar
3. Application Development Companies are the major contributors to
the ecosystem and developers, and also contract out the product
development to services companies.
4. Freelance Android Developers have the skill-set to contribute to
the ecosystem for android development, they are who create their
own applications and publish them on Google Play Store.
Freelancers can also generate money by developing applications
for product companies
. BY: Abhijeet N Kurulekar
NEED OF ANDROID
Android is a new generation mobile OS which runs on Linux
kernel.
There are some following points which describe why we use
Android OS:
1 Desktop: The Android phone adds widgets to the desktop.
The purpose for the widget,
For example, the Facebook widget allows us to update our
1,
facebook desktop.
The people widget allows us to make possible different actions
for different contacts right from our desktop.
The message widget allows us to immediately see our e-mail
from the desktop.
BY: Abhijeet N Kurulekar
2,. Connectivity:
On one page/desktop we could be able to have four connecting
device tool button like, Turn ON/OFF Bluetooth, Turn ON/OFF
WiFi, Turn ON/OFF mobile network, Turn On/Off GPS and so on.
These buttons let us switch ON/OFF instantly which will help us
to conserve battery life.
.
3.Browser: The Android OS browser is one of the best browsers
on the mobile market. It generally loads pages faster than Safari
or any other browser, has Flash support and simply does
everything a browser should do.
For example, iPhone has Safari browser. It is stable, has no
Flash support, so we cannot watch Youtube videos or any
related contents, it is not flexible but monopolistic.
BY: Abhijeet N Kurulekar
4.Open to Carrier: If we know Java programming language then we are
open to Android world.
5.Market: Android OS has an android market. The android apps are free
and work as well.
6. Future: The future mobile phones are basically going to be smart
phones.
BY: Abhijeet N Kurulekar
7. Multi-Notification: Android phones have multi-notification system.
With android the app have access to the notification system and call all
report
.
8. Google Integration: The Android has inbuilt Google support. For
example, Google Map, G-Mail etc.
9. Open Source: The code of android OS as well as the apps is
available.
10. Endless Personalization: The Android cell phone allows to
configuration their mobile to look and behave exactly like they want.
BY: Abhijeet N Kurulekar
. BY: Abhijeet N Kurulekar
1.Storage: SQLite, a lightweight relational database, is used for
data storage purposes.
2.Multitasking: Multitasking of application, with unique handling
of memory allocation, will be existing.
3.Web Browser: The web browser available in Android OS is
based on the open-source WebKit layout engine, attached with
Chrome’s V8 JavaScript engine.
BY: Abhijeet N Kurulekar
4.Open Source: Android is open-source operating system. The
source code for Android is open to the public, dissimilar iOS, which
is kept secret by Apple.
This way that anyone can work on the operating system, not only
one company developers. Therefore, app developers for android
devices are able to implement extra features of their apps, due to
the access they have to contain the source code.
BY: Abhijeet N Kurulekar
5.Accessibility: Built in text to speech in Android OS is provided
by Talk back for people with low or no vision, Enhancements for
people through hearing disabilities are available as is other aids.
6.Media Support: Android OS supports the audio/video/still
media formats like WenM, H.263, H.264, AAC, HE-AAC, MPEG-
4 SP, AMR, AMR-WB, MP3, MIDI, WAV, JPEG, PNG, GIF,
OggVorbis, FLAC, BMP, WebP.
7. Streaming Media Support: Android OS support RTP/RTSP
streaming, HTML progressive download. Adobe Flash Streaming
(RTMP) and HTTP Dynamic Streaming are supported by the
Flash plugin. Apple HTTP Live Streaming is support through
RealPlayer for Android, and through the operating system for the
duration Android 3.0 (Honeycomb). BY: Abhijeet N Kurulekar
8. Voice Based Features: Google search through voice has
been available since Android operating system release. Voice
activities for navigation, calling, texting etc. are supported on
android 2.2 forwards. As of Android 4.1, Google has expanded
Voice actions with the ability to talk back and
read answers from Google's Knowledge Graph when queried
with specific commands. The ability to control hardware have not
been implemented yet.
9.Multitouch: Android OS have native support for multitouch
which was initially made available in handsets such as HTC
Hero. These features was originally disabled at the kernel level.
Google has released an update version for Nexus One and
Motorola Droid which enables multi touch natively.
BY: Abhijeet N Kurulekar
10.External Storage: Number of Android devices include microSD slot and
can read microSD cards formatted with FAT32, Ext3 or Ext4 file system. To
allow use of high-capacity storage media such as USB flash drives and USB
HDDs, many Android tablets also include USB ‘A’ receptacle. Storage
format with FAT32 is handled by Linux Kernel VFAT driver. As third party
solutions are necessary to handle other popular file systems such as NTFS,
HFS(Hierarchical) Plus and ex FAT.
11. Video Calling: Video calling through Google Talk is available within
Android 2.3.4 and later. Gingerbread allows Nexus § to place Internet calls
with a SIP (Session Initiation Protocol) account. This allows for enhanced
VoIP (Voice Over Internet Protocol (VoIP))
dialing to other SIP accounts and even phone numbers.Skype 2.1 offer
video calling in android 2.3, include front camera support, Users with the
Google+ Android app can video chat with other Google+ users through
hangouts,
BY: Abhijeet N Kurulekar
Handset Layout: The Android OS is adaptable to the size of the
display device. The graphical rendering of individual screens is
done by the 2D/3D library based on OpenGL ES 2.0 (Open
Graphics Library for Embedded Systems)
specifications and traditional of smart phones.
GCM: Google Cloud Messaging (GCM) is a service that lets
developers send short message data to their users on Android
devices, without needing a proprietary sync solution.
Wi-Fi Direct: A technology that lets apps discover and pair
directly, over a high-bandwidth peer to-peer connection.
BY: Abhijeet N Kurulekar
Requirements for Android
OS
• Android application development on either of the following operating systems:
• Microsoft Windows.
• Mac OS X 10.5.8 or later version with Intel chip.
• Linux including GNU C Library 2.7 or later.
Tools
• All the required tools to develop Android applications are freely available and can be
downloaded from the Web. Following is the list of software's you will need before you
start your Android application programming.
1. Java JDK6 or later version
2. Android Studio / Android SDK and Eclipse IDE for Java Developers
(optional) and Android Development Tools (ADT) Eclipse Plug-in (optional)
BY: Abhijeet N Kurulekar
TOOLS and Software Requirements for Android
Download Android Studio
• From http://developer.android.com/sdk/installing/index.html
System Requirements for Windows
• Microsoft Windows 7/8/10 (32-bit or 64-bit)
• 3 GB RAM minimum, 8 GB RAM recommended (plus 1 GB for the Android Emulator)
• 2 GB of available disk space minimum, 4 GB recommended (500 MB for IDE plus 1.5
GB for Android SDK and emulator system image)
• 1280 x 800 minimum screen resolution
• Java Development Kit (JDK) 8
BY: Abhijeet N Kurulekar
Java JDK
• The Java Development Kit (JDK) is a software development environment used for developing Java
applications and applets.
• It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver
(jar), a documentation generator (javadoc) and other tools needed in Java development.
JVM
• JVM (Java Virtual Machine) is a specification that provides runtime environment in which java bytecode can
be executed.
• JVMs are available for many hardware and software platforms. JVM is a part of Java Run Environment
(JRE).
• The JVM performs following operation:
• Loads code
• Verifies code
• Executes code
• Provides runtime environment
JRE
The Java Runtime Environment (JRE) is a set of software tools for development of Java applications. It
combines the Java Virtual Machine (JVM), platform core classes and supporting libraries.
BY: Abhijeet N Kurulekar
Android SDK
The Android SDK (software development kit) is a set of development tools
used to develop applications for Android platform. The Android SDK
includes the following:
• Required libraries
• Debugger
• An emulator
• Relevant documentation for the Android application program
interfaces (APIs)
• Sample source code
• Tutorials for the Android OS
BY: Abhijeet N Kurulekar
Android Development Tools (ADT)
The android developer tools let you create interactive and powerful application for android platform.
1. Android Studio
Developed by Google, Android Studio is an all-rounder integrated development environment. Android
has Gradle-base support that has features like visual layout editor, intelligent code editor, real-time
profilers and APK analyzer.
2. Visual Studio – Xamarin
Xamarin was launched in 2011 which is the best free IDE for delivering an enterprise-quality, cross-
platform approach. Xamarin supplies add-ins to Microsoft Visual Studio that allows developers to
build Android, iOS, and Windows apps within the IDE
3. IntelliJ IDEA
Using this IDE, you can do in-depth coding, quick navigation, and error analysis. It supports mobile app
development with the help of Java, Scala, Kotlin, Groovy.
4. Eclipse IDE
It is one of the most popular IDES of Android apps. The open-source software is free to use. Released
under the Eclipse Public License, it holds a large community having plenty of plugins and
configurations. Highly customizable offers full support for Java programming language and XML.
BY: Abhijeet N Kurulekar
Installation
Java
1. Visit http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Install it.
Android Studio
3. Visit http://developer.android.com/sdk/index.html
4. click the button Download Android Studio.
5. Accept terms, and click Download.
6. Run executable file of setup.
7. Follow the setup wizard to install Android Studio and any necessary SDK tools.
8. On some Windows systems, the launcher script does not find where Java is installed. If you encounter
this problem, you need to set an environment variable indicating the correct location.
9. Select Start menu > Computer > System Properties > Advanced System Properties. Then open
Advanced tab > Environment Variables and add a new system variable JAVA_HOME that points to
your JDK folder, for example C:\Program Files\Java\jdk1.7.0_45
BY: Abhijeet N Kurulekar
Installation
10. The individual tools and other SDK packages are saved outside the Android Studio application
directory. If you need to access the tools directly, use a terminal to navigate to the location where they
are installed. For example:
11. \Users\<user>\sdk\
12. Android Studio is now ready and loaded with the Android developer tools, but there are still a couple
packages you should add to make your Android SDK complete.
Run
1. Run Android Studio as Administrator.
2. Before you create new project, click Configure from splash screen. Click SDK Manager.
3. Don’t select all. In bottom, in Extra section, select Intel x86 Emulator Accelerator.
4. Click Install button.
BY: Abhijeet N Kurulekar
Installation
launched android-studio-ide-181.5056338-windows.exe to start the installation process. The installer responded
by presenting the Android Studio Setup dialog box shown in Figure 1.
1. Set up Android Studio
Clicking Next will take you to the following panel, which provides the option to decline installing an Android
Virtual Device (AVD). BY: Abhijeet N Kurulekar
Installation
chose to keep the default settings.
After clicking Next, the Configuration Settings panel will be shown, BY: Abhijeet N Kurulekar
Installation
where you will be asked to choose where to install Android Studio.
BY: Abhijeet N Kurulekar
Installation
clicking Next will open Choose Start Menu Folder panel.
keep BY:
theAbhijeet
default setting and click Install
N Kurulekar
Installation
The following Installing panel will appear:
WhenBY:installation
Abhijeet N Kurulekar
finished, the Installation Complete panel appeared.
Installation
When installation finished, the Installation Complete panel appeared.
BY: Abhijeet N Kurulekar
Installation
After clicking Next, the installer presented the Completing Android Studio Setup panel.
To complete the installation, leave Start Android Studio box checked and click Finish.
BY: Abhijeet N Kurulekar
Running Android Studio
The first time Android Studio runs, it presents a Complete Installation dialog box that offers the option of
importing settings from a previous installation.
choose not to import settings (the default selection) and click OK, the following splash screen will appear:
BY: Abhijeet N Kurulekar
Running Android Studio
You will observe the following Finding Available SDK Components message box.
BY: Abhijeet N Kurulekar
Running Android Studio
Android Studio will present the following Android Studio Setup Wizard dialog box:
BY: Abhijeet N Kurulekar
Running Android Studio
Click Next, and the wizard will invite you to select an installation type. Keep the default standard setting.
BY: Abhijeet N Kurulekar
Running Android Studio
Then you can choose a user interface theme.
BY: Abhijeet N Kurulekar
Running Android Studio
You can choose whichever you want and click Next. Android Studio will next provide the opportunity to
verify settings.
BY: Abhijeet N Kurulekar
Running Android Studio
click Finish and Android Studio will begin the process of downloading SDK components.
BY: Abhijeet N Kurulekar
Running Android Studio
It can take several minutes for this part of the setup to finish.
BY: Abhijeet N Kurulekar
Running Android Studio
Finally, click Finish to complete the wizard. The Welcome to Android Studio dialog box appear.
BY: Abhijeet N Kurulekar
This dialog box is used to start up a new Android Studio project, work with an existing project, and more. It can
be accessed by selecting Android Studio from the Windows Start menu, or the equivalent on another platform.
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.
The main components of android architecture are, Applications, Android
Framework, Android Runtime, Platform Libraries and 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 applications
. BY: Abhijeet N Kurulekar
. BY: Abhijeet N Kurulekar
Fig. 1.18 shows the following various layers that make up
the Android Operating System (OS):
1. 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 build 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.
. BY: Abhijeet N Kurulekar
2. 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.
. BY: Abhijeet N Kurulekar
3.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 (DVM).
* The Android run time is the engine that powers our applications along with the
libraries and it forms the basis for the application framework.
(i) Dalvik Virtual Machine (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.
(ii) The core libraries in android runtime will enable us to implement an android
applications using standard JAVA programming language.
. BY: Abhijeet N Kurulekar
Platform Libraries:
Media library for playing and recording an audio and video formats:
(i) The Surface manager library to provide a display management.
(ii) SGLand OpenGL Graphics libraries for 2D and 3D graphics.
(Scalable Graphics Library)
(iii) SQLite is for database support and
(iv)FreeType for font support.
(iv) Web-Kit for web browser support and
(vi)SSL for Internet security. (Secure Socket Layer)
. BY: Abhijeet N Kurulekar
Linux Kernel:
Management and resource access.
It manage all the drivers such as display drivers, camera drivers,
Bluetooth drivers, audio drivers, memory driers, etc. which are mainly
required for the android device during the runtime.
i
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.
. BY: Abhijeet N Kurulekar
. BY: Abhijeet N Kurulekar
BY: Abhijeet N Kurulekar