0% found this document useful (0 votes)
70 views26 pages

Ch1 Android and Its Tools

The document provides an overview of Android, a mobile operating system developed by Google, highlighting its architecture, tools, and significance in mobile application development. It discusses the evolution of Android, its ecosystem, and the role of the Open Handset Alliance in promoting an open-source platform for mobile devices. Additionally, it outlines the features and benefits of Android, emphasizing its popularity and the opportunities it offers for developers.

Uploaded by

khn.salman901
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)
70 views26 pages

Ch1 Android and Its Tools

The document provides an overview of Android, a mobile operating system developed by Google, highlighting its architecture, tools, and significance in mobile application development. It discusses the evolution of Android, its ecosystem, and the role of the Open Handset Alliance in promoting an open-source platform for mobile devices. Additionally, it outlines the features and benefits of Android, emphasizing its popularity and the opportunities it offers for developers.

Uploaded by

khn.salman901
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/ 26

1…

Android and its Tools


Chapter Outcomes...
▣ Explain the given basic terms related to Android system.
▣ Explain with sketches Android architecture for the given application.
▣ Identify tools and software required for developing the given Android application with justification.
▣ Explain significance of the given component in Android architecture.

Learning Objectives…
▣ To understand Basic Concepts in Mobile Application Development and Android
▣ To learn Android with its Need, Features etc.
▣ To study Android Architecture
▣ To learn Tools in Android and Development of Android Application

1.0 INTRODUCTION
• A mobile application, most commonly referred to as an app, is a type of application software
designed to run on a mobile device, such as a smart phone or tablet computer.
• Mobile app development is the process by which a mobile application is developed for mobile devices
like Personal Digital Assistants (PDAs), tablet computer or mobile smart phones.
• Android is a mobile operating system developed by Google, based on a modified version of the Linux
kernel and other open source software and designed primarily for touchscreen mobile devices such
as smart phones and tablets.
• Today, Android is arguably the world’s most popular platform for mobile devices. Android brings
Google and the whole internet to users of smart phones, tablets and other mobile devices. In the
process, it is changing how we communicate with one another.
• For application developers, Android is an open platform that provides exciting opportunities for
developing virtually any app imaginable. With a user base that continues growing every day,
Android also has a built-in open marketplace for distributing new apps.
• Android applications can be packaged easily and sold out either through a store such as Google Play,
Windows Phone Store, SlideME, Opera Mobile Store, Mobango, F-droid and the Amazon Appstore.

1.1 INTRODUCTION TO ANDROID


• Operating System (OS) has developed a lot in last 15 years. It started from black and white phones to
smart phones or mini computers.
• 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.

[1.1]
Mobile Application Development 1.2 Android and its Tools

1.1.1 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.
• The hardware that supports android software is based on ARM architecture platform. The android is
an open source operating system means that it is free and any one can use it.
• The Android has got millions of apps available that can help us
managing our life one or other way and it is available low cost
in market at that reasons android is very popular.
• The android development supports with the full Java
programming language. Even other packages that are API and
JSE are not supported. The first version 1.0 of android
development kit (SDK) was released in 2008 and latest updated
version is Android 10. Fig. 1.1: Android Logo

• 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.
• Developing mobile applications for Android platform will give us access to a large and expanding
market in a wide variety of devices.

1.1.2 Open Handset Alliance (OHA)


• In August 2005, Google acquired Android Inc., and took over its development work to enter into the
mobile space. Since, then it is in the subsidiary of Google Inc.
• 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.
• 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 i.e., providing users
with the service and applications that they want and need.
Mobile Application Development 1.3 Android and its Tools

Handset
Manufactures

Mobile Chip
Operators Makers

Open Handset
Alliance
(OHA)

Software Commercializaton
Companies Companies

Fig. 1.2: Android Open Handset Alliance (OHA)

1.1.3 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.
3. Application Development Companies are the major contributors to the ecosystem and employ
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.

Consumers
OEMs

App Dev Houses Freelancers

Fig. 1.3: Android Ecosystem

1.2 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 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.
Mobile Application Development 1.4 Android and its Tools

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.
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.
7. Muti-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 examle, 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.

1.2.2 Android Versions


• The version history of the Android mobile operating system began with the public release of the
Android beta on November 5, 2007. The first commercial version, Android 1.0, was released on
September 23, 2008.
• Android is continually developed by Google and the Open Handset Alliance, and it has seen a number
of updates to its base operating system since the initial release.
Following table lists versions of Android:
Sr. Version and Description Features
No. Logo
1. Android 1.0 Android 1.0, the first commercial 1. Access to web email servers,
version of the software, was supporting POP3, IMAP4, and SMTP.
released on September 23, 2008. 2. Camera support but– however, this
The first commercially available version lacked the option to change
Android device was the HTC the camera's resolution, white
Dream. balance, quality, etc.
3. Wi-Fi and Bluetooth support.
4. Notifications appear in the Status
bar, with options to set ringtone, LED
or vibration alerts.
5. Supports instant messaging, text
messaging, and MMS.
2. Android 1.1 On February 9, 2009, the Android 1. Ability to save attachments in
1.1 update was released, initially messages.
for the HTC Dream only. Android 2. Details and reviews available when a
1.1 was known as "Petit Four" user searches for businesses on
internally, though this name was Maps.
Mobile Application Development 1.5 Android and its Tools

not used officially. 3. Support added for marquee in


system layouts.
3. Android 1.5 On April 27, 2009, the Android 1.5 1. Support for Widgets.
update was released, based on 2. Video recording and playback in
Linux kernel 2.6.27. This was the MPEG-4 and 3GP formats.
first release to officially use a 3. Ability to upload videos to YouTube.
codename based on a dessert item
4. Supports animated screen
("Cupcake"), a theme which would
transitions.
be used for all releases
5. Auto-rotation option.
henceforth.
Android 1.6 On September 15, 2009, Android 1. Voice and text entry search
Donut 1.6 – dubbed Donut – was enhanced to include bookmark
released, based on Linux kernel history, contacts, and the web.
2.6.29. 2. Support for WVGA (Wide Video
Graphics Array) screen resolutions.
3. Ability for developers to include
their content in search results.
4. Supports indicators of battery
usages allows users to determine
which applications/services takes
most battery power.
5. New control panel for setting up and
configuring Virtual Private Network
(VPN).
3. Android 2.0/2.1 On October 26, 2009, the Android 1. Improved typing speed on virtual
Eclair 2.0 SDK was released, based on keyboard, with smarter dictionary
Linux kernel 2.6.29 and that learns from word usage and
codenamed Eclair. includes contact names as
suggestions.
2. Numerous new camera features,
including flash support, digital
zoom, scene mode, white balance,
color effect and macro focus.
3. Bluetooth 2.1 support.
4. Microsoft Exchange email support,
with combined inbox to browse
email from multiple accounts in one
page.
5. Expanded Account sync, allowing
users to add multiple accounts to a
device for synchronization of email
and contacts.
6. Refreshed browser UI with
bookmark thumbnails, double-tap
zoom and support for HTML5.
Mobile Application Development 1.6 Android and its Tools

Android 2.2 On May 20, 2010, the SDK for 1. Speed up of the application
Froyo Android 2.2 (Froyo, short for performance due to JIT compiler.
frozen yogurt) was released, 2. Support for the Android Cloud to
based on Linux kernel 2.6.32. Device Messaging (C2DM) service.
3. Improved Microsoft Exchange
support, including security policies,
auto-discovery etc.
4. Supports USB tethering and Wi-Fi
hotspot functionality.
5. Support for installing applications to
the expandable memory (memory
card).
6. Support for high-PPI displays (up to
320 ppi), such as four-inch 720p
screens.
7. Quick switching between multiple
keyboard languages and their
dictionaries.
4. Android 2.3/2.4 On December 6, 2010, the 1. Faster, more intuitive text input in
Gingerbread Android 2.3 (Gingerbread) SDK virtual keyboard, with improved
was released, based on Linux accuracy, better suggested text and
kernel 2.6.35. voice input mode.
2. Support for extra-large screen sizes
and resolutions (WXGA and higher).
3. support for VoIP (Voice over
Internet Protocol) internet
telephony.
4. Updated user interface design with
increased simplicity and speed.
5. Support for Near Field
Communication (NFC), allowing the
user to read an NFC tag embedded in
a poster, sticker, or advertisement.
6. Support for multiple cameras on the
device.
7. Support for voice or video chat using
Google Talk.
5. Android On February 22, 2011, the Android 1. Optimized tablet support with a new
3.0/3.1/3.2 3.0 (Honeycomb) SDK – the first “holographic” user interface.
Honeycomb tablet-only Android update – was 2. Added System Bar, featuring quick
released, based on Linux kernel access to notifications, status, and
[81][82][83][84]
2.6.36. The first device soft navigation buttons, available at
featuring this version, the the bottom of the screen.
Motorola Xoom tablet, was 3. Multiple browser tabs replacing
released on February 24, 2011. browser windows, plus form auto-fill
Mobile Application Development 1.7 Android and its Tools

and a new “incognito” mode allowing


anonymous browsing
4. Quick access to camera exposure,
focus, flash, zoom, front-facing
camera, time-lapse, and other
camera features
5. Simplified multitasking – tapping
Recent Applications in the System
Bar allows users to see snapshots of
the tasks underway and quickly jump
from one application to another.
6. Redesigned keyboard, making typing
fast, efficient and accurate on larger
screen sizes.
7. Support for multi-core processors.
8. Ability to encrypt all user data.
9. Resizable Home screen widgets.
10. High-performance Wi-Fi lock,
maintaining high-performance Wi-
Fi connections when device screen is
off.
11. Improved hardware support,
including optimizations for a wider
range of tablets.
12. Increased ability of applications to
access files on the SD card, e.g. for
synchronization.
6. Android The SDK for Android 4.0.1 (Ice 1. Ability to access applications directly
4.0/4.0.1/4.0.2 Cream Sandwich), based on Linux from lock screen.
[96]
Ice Cream kernel 3.0.1, was publicly 2. Ability to shut down applications
Sandwich released on October 19, 2011. Ice from the recent apps list with a
Cream Sandwich was the last swipe.
version to officially support 3. Ability to access applications directly
Adobe Systems' Flash player. from lock screen.
4. Improved visual voicemail with the
ability to speed up or slow down
voicemail messages.
5. Soft buttons from Android 3.x are
now available for use on phones.
6. Improved camera application with
zero shutter lag, time lapse settings,
panorama mode, and the ability to
zoom while recording.
7. Support for the WebP image format.
8. Android Beam, a near-field
Mobile Application Development 1.8 Android and its Tools

communication feature allowing the


rapid short-range exchange of web
bookmarks, contact info, directions,
YouTube videos and other data.
9. Improvements to graphics,
databases, spell-checking and
Bluetooth functionality.
10. Smoother screen rotation and
Improved phone number
recognition.
7. Android Google announced Android 4.1 Smoother user interface:
4.1/4.2/4.3 Jelly (Jelly Bean) at the Google I/O (i) Vsync timing across all drawing
Bean conference on June 27, 2012. and animation done by the
Based on Linux kernel 3.0.31, Jelly Android framework, including
Bean was an incremental update application rendering, touch
with the primary aim of events, screen composition and
improving the functionality and display refresh
performance of the user (ii) Triple buffering in the graphics
interface. Jelly Bean 4.2 was based pipeline
on Linux kernel 3.4.0, and
1. Bi-directional text and other
debuted on Google's Nexus 4 and
language support and Expandable
Nexus 10, which were released on
notifications.
November 13, 2012. Google
2. Improved camera application and
released Jelly Bean 4.3 under the
support Multichannel audio.
slogan "An even sweeter Jelly
Bean" on July 24, 2013. 3. Tablets with smaller screens now use
an expanded version of the interface
layout and home screen used by
phones.
4. Lock screen improvements,
including widget support (removed
[86]
again in 2014) and the ability to
swipe directly to camera.
5. Supports Group Messaging.
6. OpenGL ES 3.0 support, allowing for
improved game graphics.
7. Reworked camera UI, previously
introduced on Google Play edition
phones.
8. Android 4.4 Google announced Android 4.4 1. Built-in screen recording feature.
KitKat KitKat on September 3, 2013 and 2. Ability for applications to use
released October 31, 2013. "immersive mode" to keep the
navigation and status bars hidden
while maintaining user interaction.
3. Wireless printing capability.
4. Storage Access Framework, an API
Mobile Application Development 1.9 Android and its Tools

allowing apps to retrieve files in a


consistent manner.
5. Better application compatibility for
the experimental Android Runtime
(ART).
6. Enforcing SELinux (Security-
Enhanced Linux).
7. New framework for UI transitions.
8. Ability for applications to trigger
translucency in the navigation and
status bars.
9. Android Android 5.0 "Lollipop" was 1. Support for 64-bit CPUs.
5.0/5.1Lollipop unveiled under the codename 2. OpenGL ES 3.1 and Android
"Android L" on June 25, 2014, Extension Pack (AEP) on supported
during Google I/O. It became GPU configurations.
available as official over-the-air 3. Android Runtime (ART) with ahead-
(OTA) updates on November 12, of-time (AOT) compilation and
2014, for select devices that run improved garbage collection (GC),
distributions of Android serviced replacing Dalvik that combines
by Google, including Nexus and bytecode interpretation with trace-
Google Play edition devices. Its based just-in-time (JIT) compilation.
source code was made available
4. User-customizable priorities for
on November 3, 2014.[176][177]
application notifications and Smart
Lollipop features a redesigned lock feature.
user interface built around a
5. A flashlight-style application is
responsive design language
included, working on supported
referred to as "material design".
devices with a camera flash.
Other changes include
Audio input and output through USB
improvements to the
devices
notifications, which can be
accessed from the lockscreen and 6. Third-party applications regain the
displayed within applications as ability to read and modify data
top-of-the-screen banners. located anywhere on external
Furthermore, Google made storage, such as on SD cards.
internal changes to the platform, 7. WebViews receive updates
with the Android Runtime (ART) independently through Google Play
officially replacing Dalvik for for security reasons, instead of
improved application relying on system-wide vendor
performance, and with changes updates.
intended to improve and optimize 8. Ability to join Wi-Fi networks and
battery usage, known internally control paired Bluetooth devices
as Project Volta. from quick settings.
9. High-definition voice calls, available
between compatible 4G LTE devices
running Android 5.1.
10. Android 6.0 Android 6.0 "Marshmallow" was Contextual search from keywords
Mobile Application Development 1.10 Android and its Tools

Marshmallow unveiled under the codename within apps.


"Android M" during Google I/O on Introduction of Doze mode, which
May 28, 2015, for the Nexus 5 and reduces CPU speed while the screen is
Nexus 6 phones, Nexus 9 tablet, off in order to save battery life.
and Nexus Player set-top box, 1. App Linking for faster instinctive
under the build number opening of links with corresponding
MPZ44Q.[206] The third developer applications.
preview (MPA44G) was released
2. Native fingerprint reader support.
on August 17, 2015 for the
3. Automatic full data backup and
Nexus 5, Nexus 6, Nexus 9 and
restore for apps.
Nexus Player devices,[207] and
was updated to MPA44I that
brought fixes related to Android
for Work profiles.[208]
11. Android 7.0/7.1 Android "Nougat" (codenamed N 1. Ability to screen zoom.
Nougat in-development) is the major 7.0 2. Improvements to file browser.
release of the Android operating 3. Daydream virtual reality platform
system. It was first released as a (VR interface).
developer preview on March 9,
4. Multi-window support, which
2016, with factory images for
supports floating apps on a desktop
current Nexus devices, as well as
layout.
with the new "Android Beta
5. New JIT Compiler, making for 75
Program" which allows supported
percent faster app installations and
devices to be upgraded directly to
a 50 percent reduction in compiled
the Android Nougat beta via over-
code size.
the-air update. Final release was
on August 22, 2016. 6. Just in Time (JIT) compiler with code
profiling to ART, which lets it
constantly improve the performance
of Android apps as they run.
7. Picture-in-picture support for
Android TV.
12. Android 8.0/8.1 Android Oreo is the 8th major 1. Multi-display support.
Oreo release of the Android operating 2. Support Google Play Protect.
system. It was first released as a 3. 2 times faster boot time.
developer preview on March 21,
4. Picture-in-picture support and
2017, with factory images for
Adaptive icons.
current Nexus and Pixel devices.
5. Neural networks API and Shared
The final developer preview was
memory API functionality.
released on July 24, 2017, with the
stable version released in August 6. Supports Programmatic Safe
2017. Browsing actions.
7. Visual changes to 'Power Off' and
'Restart' including a new screen and
floating toolbar.
13. Android 9.0 P Android "P" is the upcoming 1. Lock screen security changes include
ninth major version of the the possible return of an improved
Mobile Application Development 1.11 Android and its Tools

Android operating system. It was NFC Unlock.


first announced by Google on 2. Support for display cutouts.
March 7, 2018, and the first 3. A new gesture-based system
developer preview was released interface, navigating the OS just like
on the same day. Second preview, on an iPhone X, removed home
considered beta quality, was button and multitask button.
released on May 8, 2018. The final
4. A new "Lockdown" mode which
beta of Android P (fifth preview,
disables biometric authentication
also considered as a "Release
once activated.
Candidate") was released on July
5. Richer messaging notifications.
25, 2018.
6. New transitions for switching
between apps, or activities within
apps.
7. The "dock" now has a semi-
transparent background and
Rounded corners across the UI.
14. Android 10 Android 10 is the tenth major Android 10 introduces a
revamped full-screen gesture
release and the 17th version of
system.
the Android mobile operating
system. It was released on
1. A feature known as "bubbles" can be
September 3, 2019.
used to present content from
supported apps in pop-up overlays
(similarly to the overlay-based "chat
heads" feature of Facebook
Messenger). Apps can spawn bubbles
via notifications.
Several major security and privacy
changes are present in Android 10:
apps can be restricted by users to
only having access to location data
when they are actively being used in
the foreground. There are also new
restrictions on the launching of
activities by background apps.
2. Android Go for Android 10 uses less
storage than the previous release,
and has improved the enhancement
of speed, security and upgraded
storage tracking.
3. Android 10 features with the new
encryption standard
WPA3 encryption protocol and
Enhanced Open, which introduce
opportunistic encryption for Wi-Fi.
Mobile Application Development 1.12 Android and its Tools

1.2.3 Features of Android

Open Source Storage

External storage
Media support

Streaming Media
Support

Voice based
features

Multitouch

Web Browser

Video Calling
Accessibility Multitasking

Fig. 1.4
• Android is an open source, lightweight and powerful operating system which supports great
features. Few features of them are listed below:
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. The browser scores 100/100 on top
of the Acid3 test on Android 4.0.
Mobile Application Development 1.13 Android and its Tools

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.
Again these are only some of the unique features to Android. iOS also have many key abilities
that are missing on android devices. In the end it is up to we to decide which operating system
you would rather have. Anyone of you choose will be the right decision for you.
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 supports the following audio/video/still media formats: 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 Straming (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).
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 yet been implemented.
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.
10. External Storage: Number of Android devices include microSD slot and can rea 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 3rd party solutions are necessary
to handle other popular file systems such as NTFS, HFS Plus and ex FAT.
11. Video Calling: Video calling through Google Talk is available within Android 2.3.4 and later.
Gingerbread allows Nexus S to place Internet calls with a SIP account. This allows for enhanced
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.
12. 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
specifications and traditional of smart phones.
13. 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.
14. Wi-Fi Direct: A technology that lets apps discover and pair directly, over a high-bandwidth peer-
to-peer connection.

1.3 TOOLS AND SOFTWARE REQUIRED FOR DEVELOPING AN ANDROID


APPLICATION
• Generally to build an application for Android we should have Java Development Kit (JDK), Android
SDK, and a development environment.
Mobile Application Development 1.14 Android and its Tools

• 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 (Depreciated) and
2. 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, and Eclipse Plugin
• By downloading Android Studio directly from Google website to setup we can easily setup
development environment.
• Check following steps to know more details about setting up android development environment to
implement required apps using Android Studio.
Download Android Studio:
• In this section we are going to explain how to install android studio on windows machine which is
having Windows 10 operating system.
• 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, (See Fig. 1.5).
• 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.

Fig. 1.5 Fig. 1.6

• 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.
Mobile Application Development 1.15 Android and its Tools

Fig. 1.7 Fig. 1.8

• 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.

Fig. 1.9 Fig. 1.10

• After that it will show installation completion wizard in that click Finish to launch android studio
like as shown below.
Mobile Application Development 1.16 Android and its Tools

Fig. 1.11 Fig. 1.12

• 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.

Fig. 1.13 Fig. 1.14

• 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.

Fig. 1.16
Fig. 1.15

• 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.
Mobile Application Development 1.17 Android and its Tools

-
Fig. 1.17
• This is how we can setup android development environment on windows machine which is having
windows 10 operating system using android studio IDE.

1.4 ANDROID ARCHITECTURE


• Fig. 1.18 shows architecture of Android OS. 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 DalvikVirutal Machine (DVM) which is responsible for running a mobile
application.

Fig. 1.18: Architecture of Android


Mobile Application Development 1.18 Android and its Tools

• 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.
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.
• 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.
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.
• 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.
4. 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
(i) The Surface manager library to provide a display management
(ii) SGL and OpenGL Graphics libraries for 2D and 3D graphics
(iii) SQLite is for database support and FreeType for font support
(iv) Web-Kit for web browser support and SSL for Internet security.
5. Linux Kernel:
• Linux Kernel is a bottom layer and heart of the android architecture. It is heart of Android
architecture that exists at the root of android architecture and contains all the low-level device
drivers fro the various hardware components of an Android device.
• Linux Kernel is responsible fro device drivers, power management, memory management, device
management and resource access. 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.
Mobile Application Development 1.19 Android and its Tools

• Practice Questions
Android (Hello World) Example
• Android Studio is the official Integrated Development Environment (IDE) for Android app
development, based onIntelliJ IDEA .
• Android Studio offers even more features that enhance your productivity when building Android
apps, such as:
1. A fast and feature-rich emulator.
2. User friendly IDE.
3. A flexible Gradle-based build system.
4. A unified environment where we can develop for all Android devices.
5. Instant Run to push changes to the running app without building a new APK.
6. Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging
and App Engine
• The first step is to create a simple Android Application using Android studio. When we click on
Android studio icon, it will show screen as shown in Fig. 1.19

Fig. 1.20

Fig. 1.19

• We can start our application development by calling Start a new Android Studio project. In a new
installation frame should ask Application name, package information and location of the project.
(See Fig. 1.20)
• After entered application name, it going to be called select the form factors our application runs on,
here need to specify Minimum SDK, in we have declared as API23: Android 6.0(Mashmallow),
(See Fig. 1.21)
Mobile Application Development 1.20 Android and its Tools

Fig. 1.21
• The next level of installation should contain selecting the activity to mobile, it specifies the default
layout for Applications (See Fig. 1.22).

Fig. 1.22
• At the final stage it going to be open development tool to write the application code.
Mobile Application Development 1.21 Android and its Tools

Fig. 1.23
Anatomy of Android Application:
• Before we run our app, we should be aware of a few directories and files in the Android project,
(See Fig. 1.24).

Fig. 1.24
• The description of Fig. 1.24 is:
Sr. No. Folder, File & Description
1. Java
This contains the .java source files for your project. By default, it includes an
Mobile Application Development 1.22 Android and its Tools

MainActivity.java source file having an activity class that runs when your app is launched
using the app icon.
2. res/drawable-hdpi
This is a directory for drawable objects that are designed for high-density screens.
3. res/layout
This is a directory for files that define your app's user interface.
4. res/values
This is a directory for other various XML files that contain a collection of resources, such as
strings and colours definitions.
5. AndroidManifest.xml
This is the manifest file which describes the fundamental characteristics of the app and
defines each of its components.
6. Build.gradle
This is an auto generated file which contains compileSdkVersion, buildToolsVersion,
applicationId, minSdkVersion, targetSdkVersion, versionCode and versionName
• Following section will give a brief overview of the important application files.

The Main Activity File:


• The main activity code is a Java file MainActivity.java. This is the actual application file which
ultimately gets converted to a Dalvik executable and runs your application. Following is the default
code generated by the application wizard for Hello World! application −
package com.example.helloworld;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
• Here, R.layout.activity_main refers to the activity_main.xml file located in the res/layout folder. The
onCreate() method is one of many methods that are figured when an activity is loaded.
The Manifest File:
• Whatever component we develop as a part of our application, we must declare all its components in
a manifest.xml which resides at the root of the application project directory. This file works as an
interface between Android OS and our application, so if we do not declare our component in this file,
then it will not be considered by the OS. For example, a default manifest file will look like as
following file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.niralibooks.myapplication">
<application
Mobile Application Development 1.23 Android and its Tools

android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
• Here <application>...</application> tags enclosed the components related to the application.
Attribute android:icon will point to the application icon available under res/drawable-hdpi. The
application uses the image named ic_launcher.png located in the drawable folders
• The <activity> tag is used to specify an activity and android:name attribute specifies the fully
qualified class name of the Activity subclass and the android:label attributes specifies a string to use
as the label for the activity. You can specify multiple activities using <activity> tags.
• The action for the intent filter is named android.intent.action.MAIN to indicate that this activity
serves as the entry point for the application. The category for the intent-filter is named
android.intent.category.LAUNCHER to indicate that the application can be launched from the
device's launcher icon.
• The @string refers to the strings.xml file explained below. Hence, @string/app_name refers to the
app_name string defined in the strings.xml file, which is "HelloWorld". Similar way, other strings get
populated in the application.
• Following is the list of tags which you will use in your manifest file to specify different Android
application components:
1. <activity>elements for activities
2. <service> elements for services
3. <receiver> elements for broadcast receivers
4. <provider> elements for content providers
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 −
1. Activities: They dictate the UI and handle the user interaction to the smart phone screen.
2. Services: They handle background processing associated with an application.
3. Broadcast Receivers: They handle communication between Android OS and applications.
4. Content Providers: They handle data and database management issues.
• There are additional components which will be used in the construction of above mentioned entities,
their logic, and wiring between them. These components are:
1. Fragments: Represents a portion of user interface in an Activity.
Mobile Application Development 1.24 Android and its Tools

2. Views: UI elements that are drawn on-screen including buttons, lists forms etc.
3. Layouts: View hierarchies that control screen format and appearance of the views.
4. Intents: Messages wiring components together.
5. Resources: External elements, such as strings, constants and drawable pictures.
6. Manifest: Configuration file for the application.
Strings File:
• The strings.xml file is located in the res/values folder and it contains all the text that our application
uses. For example, the names of buttons, labels, default text, and similar types of strings go into this
file. This file is responsible for their textual content. For example, a default strings file will look like
as following file:
<resources>
<string name="app_name">HelloWorld</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
<string name="title_activity_main">MainActivity</string>
</resources>
Layout File:
• The activity_main.xml is a layout file available in res/layout directory, that is referenced by your
application when building its interface. You will modify this file very frequently to change the
layout of your application. For your "Hello World!" application, this file will have following content
related to default layout −
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:padding="@dimen/padding_medium"
android:text="@string/hello_world"
tools:context=".MainActivity" />
</RelativeLayout>
• This is an example of simple RelativeLayout which we will study in a separate chapter. The TextView
is an Android control used to build the GUI and it have various attributes like android:layout_width,
android:layout_height etc which are being used to set its width and height etc.. The @string refers to
the strings.xml file located in the res/values folder. Hence, @string/hello_world refers to the hello
string defined in the strings.xml file, which is "Hello World!".
Running the Application
• Let's try to run our Hello World! application we just created. We assume we had created our AVD
while doing environment set-up. To run the app from Android studio, open one of our project's
activity files and click Run icon from the tool bar.
• Android studio installs the app on your AVD and starts it and if everything is fine with our set-up
and application, it will display following Emulator window:
Mobile Application Development 1.25 Android and its Tools

Fig. 1.25
Advantages Android:
1. Supports 2D, 3D graphics: It supports various platforms like 2D and 3D. Earlier we used to watch
movies and play games in almost in 2D, but nowadays various applications are using 3D format.
To provide different graphics in videos, games OS should support 3D format. Android supports
2D and 3D format to provide a better advantage in videos and in games.
2. Supports Multiple Languages: Android supports different languages. We can say all famous
languages about more than 100. By using this feature it is easy to adopt to different languages.
Earlier in the feature phones English is to be the only language in the mobile devices.
3. Faster Web Browser: As it enabled with web browser we surf web easily without complexity just
like in a computer. It easily loads multimedia so that it makes web browsing faster.
4. Video Calling: Faster data connection enables to do video call. We can take advantage of
bandwidth and new generation networks using Android.
5. Open Source Framework: It makes users to make their own applications and to make changes
required for themselves. Enthusiasts can make Andriod more powerful and useful by developing
themselves. As it is an open source operating system, we can use it easily and without cost in the
equipments.
6. Uses of Tools are Very Simple: It makes use of a single button to do more than assigned work.
For example volume control button can be made to click a photo by changing simple algorithm in
the android.
7. Availability of Apps: Anyone can make use lot of free apps in the app store and from other
android stores. It gives freedom to install from third party users.
8. Great Social Networking Integration: Integration can be made to different social networking
sites,so you can enhance features. Free to customize the applications and features, using user
enabled development
9. Better Notification System: It makes users to check important notifications directly from the
dashboard. It makes work easy. Earlier we used to go for every application refresh to check
updates.
10. Updated User Interface Design: Interfacing that means human to machine integration made to
update in android. Touchscreen made very useful change in the mobile use. It enables zooming
and tapping features which perform very effectively in the Android operating system
11. At a Time Aplications: Can run numerous applications which allow consumers to help save time
and efforts
Mobile Application Development 1.26 Android and its Tools

12. Low Chance of Crashing: The Android OS is very smooth and easy to operate and less chances of
crashing down
13. Stability: Stability and security is better than other mobiles OS as it is based on Linux Kernel. The
Linux based operating system enabled with high security with unix. Every operation goes into
command mode. If detected any security threats it goes to basic mode by storing to another
application like cloud computing and crashes all the data on the device.
14. Multitasking: Android phones can run many applications, it means we can browse while
listened to the song.
Disadvantages Android:
1. Need internet connection: Android requires an active internet connection. At least there should
be a GPRS internet connection in your area, so that the device is ready to go online according to
our needs.
2. Advertising: Application in the Android phones can indeed be obtained easily and for free, but
the consequences in each of these applications, will always be ads on display, either the top or
bottom of the application.
3. Wasteful Battery: Android more wasteful than any other operating system, because this
operating system is a lot of "process" in the background that lead to the battery quickly drains.
4. Many applications contain virus: The virus inserted android applications including Counter
Strike Ground Force, Puzzle Sexy Girls, Sexy Girls Photo Game, etc. Android Application contain
virus also present in the Android Market.
5. Slow response: compared to ‘ios’ of apple,windows 8 of Microsoft.when we open same app in the
ios and windoes8. We observe the slow response of the android when we open apps in the
different platforms.
6. Heat: Compared to other operating systems android makes use of processes very efficient. This
makes processor to get heat. Some hardware companies take care to reduce heat,but it went in
vain when we operate it a long time and at low battery.

You might also like