An article about mobile application development platforms and Android application development. I have written this report for Advanced Composition class.
3. Android Application Development
ii
I.
INTRODUCTION................................................................................................1
A.
INTRODUCTION..................................................................................................2
II.
MOBILE APP PLATFORMS...............................................................................4
A.
NATIVE APPLICATIONS.........................................................................................5
1.
Android...........................................................................................................................5
2.
iOS.................................................................................................................................5
3.
Others ............................................................................................................................6
B.
MOBILE WEB....................................................................................................6
1.
jQuery Mobile..................................................................................................................7
2.
Sencha Touch.................................................................................................................7
3.
Others ............................................................................................................................8
C.
HYBRID ...........................................................................................................8
1.
Apache Cordova .............................................................................................................8
2.
Appcelerator Titanium ......................................................................................................8
3.
Others ............................................................................................................................9
III.
ANDROID APPLICATION DEVELOPMENT.....................................................10
A.
ANDROID OPERATING SYSTEM ...........................................................................11
1.
History ..........................................................................................................................11
2.
Features........................................................................................................................12
3.
Devices.........................................................................................................................12
4.
Market Share.................................................................................................................12
B.
DEVELOPMENT................................................................................................13
1.
Environment ..................................................................................................................13
2.
Language......................................................................................................................13
3.
Tools and Frameworks...................................................................................................14
C.
DESIGN.........................................................................................................16
1.
User Interface................................................................................................................16
2.
User Experience............................................................................................................17
D.
TESTING........................................................................................................17
1.
Testing..........................................................................................................................18
2.
Types and Challenges ...................................................................................................18
E.
DISTRIBUTION .................................................................................................18
1.
Google Play ..................................................................................................................19
2.
Custom Install................................................................................................................19
4. Android Application Development
iii
List of Figures
Description Page
1. Share of time spent on mobile 2
2. Mobile operating system market share 3
3. Steve Jobs introducing the first iPhone 5
4. UNO's student information portal, Mavlink 6
5. A college finder app that I developed using jQuery Mobile 7
6. Sample Jog with Friends app developed using Sencha Touch 7
7. ZipCar hybrid mobile app 8
8. Founder of Android Inc. Andy Rubin 11
9. XML code for a sample Android design 16
10. Android Lollipop material design 16
11. Activating third-party app install 19
List of Tables
Description Page
1. Android SDK Tools 15
2. Before and after Android Annotations 15
5. Android Application Development
iv
Executive
Summary
Mobile applications, that are special type of software applications designed to run on mobile
devices, are one of the fastest growing technologies in last decade. According to a research by
comScore, mobile application usage has increased 52% from June 2013 to June 2014, while
desktop application usage increased only 1%.
This report aims to engage readers, who have only basic computer knowledge and interest in
mobile application development, with mobile application development in easiest and shortest
way. To reach that goal, it is important to understand basics of mobile application development
and platform choices.
Importance
of
Mobile
The report about daily time spent with media in USA, by eMarketer, shows that the time spent in
one day on a mobile device has increased from 24 minuets to 2 hours and 51 minuets from 2010
to April, 2014. In 2013, for the first time, it passed the time spent with computers (includes PCs
and laptops). While daily usage of computers decreasing, mobile devices’ is continuing to grow.
comScore’s report gives us information about the distribution of the time spent with a mobile
device. People usually use mobile applications for social networking, games, radio, multimedia,
retail, and many other purposes. The statistic concludes that mobile applications have big impact
on users and it helps them to fulfill their daily tasks.
Source: (“The U.S. Mobile App Report”, 2014)
25%
16%
8%
5%
5%
4%
4%
33%
Social
Networking
Games
Radio
Multimedia
Retail
Instant
Messengers
Photos
All
Others
6. Android Application Development
v
Mobile
Application
Platforms
Three types of mobile applications are native mobile applications, mobile web applications and
hybrid applications. Even if hybrid and mobile web applications are also considered as mobile
application, the term “mobile application” was first used for native applications.
Native mobile application is an application program that is developed for a specific mobile
operating system such as Android and iOS.
Mobile web application is a website that looks and functions like a mobile application. It is
designed for smaller screen sizes.
Hybrid aplication is in between a native mobile application and mobile web application. It is a
mobile web application in a thin container of native application code.
Since native appplications are developed for a specific platform, this gives them power to access
all hardware features and platform libraries. In contrast, mobile web and hybrid applications don’t
have full access to device features and their functionalities are limited. Mobile web application
development requires knowledge of web technologies and it needs to be hosted in a server since
it is not a downloadable application.
As name indicates, “native” application is the best way to learn mobile application development
and the report will explain it in detail different than others.
Android
Application
Development
After comparing different types of mobile application platforms, it has came to conclusion that
Android is the best platform for a beginner developer, for following reasons:
• It has the biggest market with 84.4% share according to International Data Corporation’s
2014 third quarter report.
• It is developed using the most popular programming language, Java.
• It is an open source project and it is not developed for a specific device or company, it
works on variety of devices.
• It is completely free to learn, develop and distribute the application.
• It has the biggest online developer community among other mobile platforms.
• It has more tutorials compared to other platforms.
7. Android Application Development
1
I. INTRODUCTION
Android is the most common of three major mobile operating systems
(“Android’s Smartphone Dominance Is Growing”, 2014). There are
many other operating systems, but Android’s market share has been
growing significantly in last four years. This growth moved Android to
the first place after it has passed the previous leader of the list, iOS, in
2012 (“Android Vs. iOS: What’s The Most Popular Mobile Operating
System In Your Country?”, 2013). This report will compare mobile
application platforms overall and explain Android application
development in detail.
Source: Android Mobile HD Wallpapers.
(2014,
8. Android Application Development
2
A. Introduction
The time spent with mobile devices has been
increasing significantly in last four years
according to eMarketer, which is an industry
leading research firm. Their April, 2014 report
(“Mobile Continues to Steal Share of US
Adults' Daily Time Spent with Media”, 2014)
shows that, in 2013, the time spent with
digital media surpassed the time spent with
TV, and mobile devices are the main reason
for this shift. In 2013, a person spent average
2 hours and 19 minuets with mobile devices
and same amount of time with computers
daily. Their 2014 forecast is expecting an
increase in mobile by 23% reaching 2 hours
and 51 minuets and a decrase in computer
usage by 0.05% dropping to 2 hours and 12
minuets.
The distribution of time spent with mobile is a
meaningful piece of information for
developers and enterprises to analyze the
categories users are engaged more. A
research (“The U.S. Mobile App Report”,
2014) by comScore, an American Internet
analytics company, shows us share of time
spent on mobile in Figure 1. The same report
also unveils that 85% of mobile device
activity comes from mobile applications.
Mobile application (commonly referred as
“app”) is a type of software application that is
designed to run on a mobile device.
Compared to desktop applications, they
avoid multitasking and provide limited
functionalities because of limited hardware
capabilities. The biggest contributers of this
technology are the mobile device
manufacturers, the mobile operating system
developers and the mobile app developers.
Mobile operating systems are the
connections between developers and mobile
devices. Mobile apps are developed for
mobile operating system, not for mobile
device.
Figure 1 - Share of time spent on mobile
Source: (“The U.S. Mobile App Report”, 2014)
Between more than fifteen mobile operating
systems, Android and iOS are the most
popular ones. Other platforms’ dominance in
the mobile market is not as significant as
theirs . According to International Data
Corporation’s (IDC) 2014 third quarter report
(“Smartphone OS Market Share”, 2014),
Android and iOS have rate of shipment
84.4% and 11.7%, respectively, in global
market, as shown in Figure 2.
Android is one of the two major operating
systems for mobile devices, and it is an open
source project. It is completely free to
develop and publish an android application,
and it is easy to learn, since Android
applications are written in Java, the most
popular programming language (“Top 10
Programming Languages”, 2014). This report
aims to explain Android app development in
detail. Before that it will be helpful to take a
25%
16%
8%
5%
5%
4%
4%
33%
Social
Networking
Games
Radio
Multimedia
Retail
Instant
Messengers
Photos
All
Others
9. Android Application Development
3
closer look at different types of mobile apps
and mobile app development platforms.
Figure 2 - Mobile operating system market share
Source: (“Smartphone OS Market Share”, 2014)
10. Android Application Development
4
II.Mobile APP
Platforms
Mobile app development is more important than ever before. As a
result of that number of mobile app platforms has increased with the
help of developing technology. Even if many people only familiar with
native app platforms, there are two other types that are gaining
importance. In this section we will explain three different types of
mobile applications that are: 1.Native Applications, 2.Mobile Web
Applications and 3.Hybrid Applications, and give information about
the most common app development platforms for each type.
Source:Mobileappplatformicons.
11. Android Application Development
5
A. Native
Applications
Coding is the core part of developing a
mobile application. Mobile application
platforms allow developers to create
applications using a unique programming
language that is associated with the platform.
Native mobile app is an application program
that is developed for a specific platform or
device. It has advantage of accessing other
applications installed on the device and
hardware features, since it is developed for a
specific platform. Android, iOS, Symbian
(Nokia), Windows Phone (Microsoft), webOS
(Amazon) and RIM OS (BlackBerry) are the
most popular native mobile application
platforms. This section will cover Android and
iOS in detail and provide some basic
information about the other platforms.
1. Android
Android is the most popular mobile operating
system that was created by Android Inc.
Google acquired the company in 2005, and it
is beiing managed by Google as an open
source platform since then. Android is part of
the Open Handset Alliance (OHA), which is a
consortium of 84 firms to develop open
standards for mobile devices. Each
manufacturing company in OHA can choose
which set of built-in applications and set of
features want to include in the Android
compatible devices (“Industry Leaders
Announce Open Platform for Mobile
Devices”, 2007).
Android is built on top of modified version of
Linux kernel and consists of a software stack
for mobile devices and a software platform
foundation for third party applications.
Android offers a Software Development Kit
(SDK) and Android Developers Tools (ADT) to
third party developers. Applications are
primarily developed in the Java programming
language using Android SDK.
2. iOS
iOS is the competitor for Android, and it is
developed by Apple and designed to run on
Apple devices only such as iPhone and iPad.
iOS applications are developed in Objective-
C, which is a C based language developed
by Apple, using Xcode development
environment. Xcode is Apple’s IDE for iOS
and Mac OS applications, and it only works
on devices with Mac OS. To install Xcode to
a Windows or Linux machine, developers
have to setup a Mac OS virtual machine.
Figure 3 - Steve Jobs introducing the first iPhone
Source: AP, 2007
Apple’s Xcode comes with iOS simulator to
test devices virtually. Installing development
environment and testing on a simulator is
free. To test an application on a device,
which requires key files for each device, and
submit in the app market, developer has to
register for a developer account for $99.
Apple also offers Enterprise Developer
program for $299. It allows companies to
distribute apps privately to their employees
without submitting to app store.
12. Android Application Development
6
3. Others
In addition to Android and iOS, there are
some other mobile application platforms like
Symbian, Windows Phone, RIM OS and
webOS.
Windows Phone (formerly Windows Mobile)
is the third biggest OS with 2.5% of the
worldwide market share in the second
quarter of 2014 (“Smartphone OS Market
Share”, 2014). Microsoft develops it, and it is
successor to Windows Mobile —even if they
are not completely compatible.
Microsoft allows developers several platforms
to develop third party applications such as
Silverlight, XNA and Windows Phone App
Studio. It is essential to download Windows
Phone SDK, however developers can create
an account at Microsoft to test apps in their
device for free. Windows Phone applications
can be developed using C#, .NET or C++
languages.
Symbian is an open-source operating system
currently used in Nokia mobile devices. It
was created by Symbian Ltd and licensed by
other phone manufacturers like Nokia,
Ericsson, Motorola and Samsung. In late
2008, Nokia purchased Symbian Ltd and
created Symbian Foundation to open source
-- it was closed source before -- and
manage the operating system. It was the
most popular smartphone OS in the world
until the end of 2010, when it was overtaken
by Android.
B. Mobile
Web
Until 2011, the term “mobile app” was being
used for only native mobile apps. After
finalization of HTML5, which is the latest
version of HTML markup language for
webpages that brought standalone support
for multimedia and graphics without the need
of client side plug-ins, web applications have
gained importance and mobile version of
web applications that are designed for
mobile devices started to become popular.
Mobile web applications are not real
applications; they are websites that look and
function like a mobile application. They are
typically written using web languages
HTML5/CSS/JS. Compared to native apps,
they have limited functionalities. They can’t
access hardware features, they are not
downloadable, and they run on device
browser. For example, University of Omaha
Nebraska’s (UNO) student information portal
Mavlink has mobile version of their web
application that is hosted on UNO’s server.
Figure 4 - UNO's student information portal,
Mavlink
13. Android Application Development
7
This section will cover two of the mostly
preferred mobile web application frameworks
in detail and provide overall information about
the other platforms.
1. jQuery
Mobile
jQuery Mobile is one of the first and most
popular mobile web application frameworks.
jQuery Mobile is mobile framework of jQuery
that is an open source JavaScript library
developed and maintained by jQuery
Foundation. jQuery applications are
developed using HTML5 elements for
markup and CSS3 for styling; and jQuery
provides large collection of User Interface (UI)
elements. It is compatible with all major
mobile and desktop browsers including iOS,
Android, BlackBerry, WebOS, Symbian,
Windows Phone, and more.
Figure 5 - A college finder app that I developed
using jQuery Mobile
2. Sencha
Touch
Sencha Touch is another commonly used
mobile framework that is also based on web
technologies such as HTML5, CSS3 and
JavaScript. It differs from jQuery Mobile,
because its all UI components require
JavaScript. Sencha Touch applications offer
more native like feeling and it is more fluid.
Figure 6 - Sample Jog with Friends app developed
using Sencha Touch
Developing in Sencha Touch is free, but it
costs extra to get official IDE and
professional support. At first, professional
support might not look necessary. However,
it is harder to learn Sencha Touch app
development, compared to other
platforms.
14. Android Application Development
8
3. Others
In addition to jQuery Mobile and Sencha
Touch, there are many other mobile web
application frameworks. Every other day new
platforms are entering to the mobile web
world offering different features and
functionalities. Kendo, Ionic + Angular JS
and React are some of them. They all differ
from each other with design, performance,
portability and responsiveness.
C. Hybrid
Hybrid applications stand in between mobile
web apps and native apps. They are mobile
web apps that are embedded in a thin
container of native code, so they act like a
native app. They have access to some of
device capabilities like camera and
accelerometer. Once a hybrid app is
completed, it can be compiled for various
native mobile application platforms. It is
possible to distribute them at app stores.
Compared to native apps, hybrid apps are
lower performance; but it is cheaper and
easier to learn developing a hybrid app.
However, it is important to understand your
expectations from the application and take
user experience into consideration. For
example, native approach would result best
for a game for best graphic performance,
whereas hybrid application would be a better
option for a restaurant or a retail store that
shows locations, images and a map. In this
section we will take a closer look at two of
the most popular hybrid app platforms and
provide overall information about other ones.
Figure 7 - ZipCar hybrid mobile app
1. Apache
Cordova
Apache Cordova, formerly known as
PhoneGap, is one of the oldest and most
common hybrid application frameworks. It is
an open source project, and it allows
developers to write web applications using
HTML5, CSS3 and JavaScript. To create
hybrid version of your web-app, PhoneGap
offers a website (http://build.phonegap.com)
where developers can upload their web app.
PhoneGap lets you to select the platform and
compiles app file for desired platform
(Android, iOS, Windows Phone or more).
2. Appcelerator
Titanium
Appcelerator Titanium is another open
source hybrid application framework that is
similar to Sencha Touch for language
preference --it also requires JavaScript for
code base. However, Titanium differs from
other hybrid mobile app platforms in that it is
actually a native application. Titanium takes
15. Android Application Development
9
the JavaScript code, processes and then
generates native app equivalent of your
code.
It is free to download Titanium IDE and SDK,
and it has strong developer community that
helps developers to find solutions easily to
their problems.
3. Others
Besides that there are some other hybrid
platforms that are getting more powerful
every other day. Some platforms prefer to
use WebView – a view container in native
apps that helps to browse Internet – and
embed the app in this WebView, while some
newer platforms focuses on mapping their
code pieces with the ones in native app.
Having a mobile app is becoming a necessity
for every business, but it is very expensive to
support all the platforms. Some businesses
prefer to have mobile web app, while some
others prefer a better option that is closer to
native apps. That’s where hybrid apps come
to stage. Only one developer can create a
hybrid app and generate app files for other
native platforms as many as he wants. It is
possible to create mobile app for iOS,
Android, Windows Phone and other
platforms with effort of one app sacrificing a
little from performance of the app.
16. Android Application Development
10
III. Android
Application
Development
The first step before using an environment is getting to know it
better. The purpose of this section is to discover Android OS in detail
and then to provide extensive guide to develop an Android
application.
Source: Android Learning Logo
17. Android Application Development
11
A. Android
Operating
System
The first thing that comes to mind when we
hear the word “Android OS” is a smartphone,
however, Android OS has a wider application
areas. With the help of different
implementations, Android OS can be used in
cars, TVs, smart watches, digital cameras
and game consoles. This section will
introduce Android OS, its features, devices
that run Android OS and its place in global
mobile market.
1. History
Android has an interesting background. It
was a small company founded to create
applications for digital cameras, since digital
cameras were very popular back in 2003.
The founder of Android Andy Rubin didn’t
see big potential in digital camera market
and had decided to shift focus to mobile
phones (“I, Robot: The Man Behind the
Google Phone”, 2007).
Figure 8 - Founder of Android Inc. Andy Rubin
Source: (Akiyama, 2008 Google
Developer Day in Japan - Press
Conference: Andy Rubin.)
In 2005, Google acquired Android Inc. Key
employees of Android Inc. stayed at the
company after acquisition. In Silicon Valley,
people have heard Google was working on a
new technology in mobile field, but
everybody assumed that they were working
on a smartphone rather than just an
operating system. When Apple unveiled the
iPhone, people started to expect a gPhone
from Google (Helft & Markoff, 2007).
In 2007, Open Handset Alliance (OHA), a
consortium of thirty-four technology
companies including Google, HTC, Sony,
Samsung, Sprint, T-Mobile, Qualcomm and
Texas Instruments, unveiled itself to develop
open standards for mobile devices; and
Android was the first product as a mobile
operating system based on Linux kernel. In
2008, HTC Dream, the first commercially
available Android smartphone, released
(“Industry Leaders Announce Open Platform
for Mobile Devices”, 2007).
Android has been around for 6 years, and
during that time we’ve seen unbelievable
transformation in Android unlike other
platforms. Google has applied rapid-iteration,
it is a development model that is based on
generating small ideas and applying them
with “fail fast and move forward”, to an
operating system and the result was
continual improvement. In the first year,
Google was putting put a newer version of
Android OS every two and a half months—
now it is every six months. As we all know,
quantity of versions doesn’t measure quality.
However, Android is showing off a new
feature, different look and better user
experience with every release. For instance,
iOS had only one major design revision in 7
years, and the newest version of Windows
18. Android Application Development
12
Phone 8 looks like Windows Phone 7. On
Android, only Play Store had five major
design changes in 5 years.
Android has released 21 versions so far
including latest release Android Lollipop.
Every major Android release is named in
alphabetical order after a dessert. For
example, third version of Android was named
Cupcake; and Donut, Éclair, Froyo and
others followed that up to latest release
Lollipop.
2. Features
Android has released twelve different major
versions so far improving performance, user
experience and scope of functionalities after
every release. It provides useful
functionalities in various areas including
instant messaging, media, gestures and
location services.
Android apps are written in the Java
language and compiled into Dalvik
executable (DEX) format. Each application
executes on its own process on Dalvik virtual
machine. Developers have full access to all
frameworks that core applications use and
Google-developed libraries. Android’s
software architecture is designed to simplify
component reuse. Any application can
publish its own capabilities and any other
application can use them. For example, the
app you wrote can call Camera application of
Android. Once Camera application took the
photo, it will pass this data to your app and
you will be able to use it.
Android consists of its own unique features
and the features that are common in many
other mobile operating systems such as
messaging, web browser, voice commands,
multi-touch, multitasking, multiple language
support, accessibility, Bluetooth, GPS,
orientation sensors, external storage, media
support, variety of sensors and more.
Some of the features that are unique to
Android are infrared transmission, alternate
keyboards, no-touch control (wave control),
automation, wireless app downloads,
storage or battery swap, custom home
screens, widgets, Near Field Communication
(NFC).
3. Devices
Unlike Apple, Android runs on variety of
devices from different manufacturers. As we
mentioned earlier, Android has been released
as a standard for the OHA that includes
various phone manufacturers. Since it is an
open source project, developers, who are
experienced in installing operating system to
a mobile device, can even change it and
install it to whatever device they want as long
as device has enough capabilities to support
it. For instance, CynagenMod, a community
built distrubution of Android, is the most
popular aftermarket firmware that extends
capabilities of the device. It is developed and
maintained by a group of volunteer
developers.
4. Market
Share
Android has the biggest market share with
84.4%, while iOS stays at 11.7% in global
mobile market (“Smartphone OS Market
Share”, 2014). It is important to analyze
market share before developing any
application. It will give us idea to make
investment decisions.
19. Android Application Development
13
B. Development
The first step in development is downloading
required softwares and setting up the
development environment. Andoroid
provides a collection of development tools
for free. In addition to core Android tools and
softwares, some third party tools also might
be helpful for developers.
This section will cover development
environments for Android, softwares to
install, useful tools and frameworks,
capabilities of this environments and
references to resources to obtain more
detailed information about development.
1. Environment
Integrated Development Environment (IDE) is
a set of programming tools (source code
editor, compiler, debugger, etc.) for writing
applications, all activated from a common
user interface and menus (“IDE Definition”,
n.d.). It is not mandatory to have an IDE for
Android development. You can use any text
editor to write your code and develop your
application. However, having an IDE will give
you a productivity boost and make it easier
to complete your tasks. According to
answers from Stack Overflow, which is the
most popular Q&A (question and answer)
website for developers, Eclipse and IntelliJ
IDEA are the mostly preferred IDEs. (“What is
the best IDE to develop Android apps in?”,
2009).
Eclipse is the most commonly used IDE for
Android development. It is an open source
project of Eclipse foundation and it can be
downloaded from official Eclipse website
(www.eclipse.org) for free. To start
development with Eclipse, it is required to
download Android Developer Tools (ADT),
which provides user interface access to SDK
tools, from Android website.
IntelliJ IDEA is a product of JetBrains, a
software development company based in
Czech Republic. It has two different versions.
Community Edition is for free. Ultimate
Edition is free for the first month, but after
that it is required to buy a license. JetBrains
offers two different licensing options at
different costs: 1.Individual developers and
2.Companies and organizations (“The Most
Intelligent Java IDE”, n.d.). Ultimate version of
IntelliJ IDEA offers more features than
Community Edition does. Some of these
features include; database tools, web
development tools, code assitance tools and
language support for Python, Ruby, SQL,
and etc.
On May 15, 2013, Google announced a new
official IDE for Android, Android Studio, at
Google’s annual developer conference
Google I/O (“Google I/O 2013: What's New
in Android Developer Tools”, 2013). It is an
IDE based on IntelliJ. It comes with SDK
tools installed.
The biggest difference between iOS and
Android development is environment. iOS
apps are developed in Xcode, Apple’s IDE
for iOS and Mac OS app develoment, and it
only works on computers with Mac OS. It is
possible to set up a virtual machine for Mac
OS on a Microsoft or Linux computer, but it
will be slower than a Mac computer; and it is
not recommended.
2. Language
One of the reasons of why I focused on
Android is that it is easier to learn app
20. Android Application Development
14
development compared to other native app
development platforms. The official language
for Android development is Java, the most
popular and commonly used programming
language (“Top 10 Programming
Languages”, 2014). Large parts of Android
are written in Java. It is possible to develop a
C and C++ app using the Android Native
Development Kit (NDK), however it is not
recommended. According to Google
(“Android NDK”, n.d.) :
Before downloading the NDK, you
should understand that the NDK will
not benefit most apps. As a
developer, you need to balance its
benefits against its drawbacks.
Notably, using native code on Android
generally does not result in a noticable
performance improvement, but it
always increases your app
complexity. In general, you should
only use the NDK if it is essential to
your app—never because you simply
prefer to program in C/C++.
One of the main reasons Java is so popular
is its platform independence. It means that a
Java application can work on any electronic
device with any operating system (Windows,
Mac OS, Linux, and Symbian etc. ) as long
as Java Runtime Environment (JRE) is
installed. Java is widely used for desktop,
mobile and web applications. If you know
Java, you won’t need to learn any another
language to develop an Android app. In
contrast, Objective-C is only used for iOS
and Mac OS app development – this doesn’t
mean it can’t be used for anything else, but
there is no common practical example of this
so far.
Online learning industry is growing rapidly
providing new tutorials, online classes and
interactive courses in subjects from various
numbers of fields, for people at different
levels. A programming language can easily
be learned with the help of online resources
even if the person has no language
experience. A basic Google search for terms
“java tutorial” will show us that Java has
more online tutorials than any other
languages that are used in mobile app
development. In addition to that, online
developer community of Java and Android
together is the biggest one in mobile app
world (“Stack Overflow Tags”, n.d.;
“Undergraduate Enrollment in Distance
Education Courses and Degree Programs”).
3. Tools
and
Frameworks
The Android SDK includes a variety of tools
that help you develop Android app. The tools
are separated to two groups: SDK tools and
platform tools. SDK tools are independent
from platform and it is required no matter
what version you are working on. The
platform tools are updated every time you
install a new SDK platform. Some of these
tools are briefly explained in Table 1.
In addition to tools provided by Android, it is
easy to find third party tools and frameworks
that will be helpful during development
phase. For example, Gradle, a third party
build tool, is the most popular one between
Android developers. When you develop an
application you might need extra libraries for
your app. Downloading them manually
everytime you make changes in your project
is waste of time. Especially, if you are not the
only one in the project, and you are working
with a team, the problem gets bigger. Gradle
makes it easier to manage dependencies.
21. Android Application Development
15
Even if IDEs provide their custom build tools,
developers prefer to use it since it is easier
and more useful.
Table 1 – Android SDK Tools
Tool Description
Android Virtual Device
Manager (AVD
Manager)
Lets you create and
manage Android Virtual
Devices for emulator.
Android emulator
Device-emulation tool for
testing apps in actual
Android environment.
lint
Code analysis tool for
potential bugs and
optimization
improvements.
SDK Manager
Lets you manage SDK
packages.
sqlite3
Allows you access data
files.
Android Device Bridge
(adb)
Lets you communicate
with emulator or device.
uiatutomator
Lets you test your UI
automatically by creating
automated functional UI
tests.
Draw 9-patch
Allows you to create
NinePatch* graphics.
Logcat
Provides a mechanism
for collecting and
viewing system debug
output.
* A special image type that scales when content is added
In addition to tools provided by Android, it is
easy to find third party tools and frameworks
that will be helpful during development
phase. For example, Gradle, a third party
build tool, is the most popular one between
Android developers. When you develop an
application you might need extra libraries for
your app. Downloading them manually
everytime you make changes in your project
is waste of time. Especially, if you are not the
only one in the project, and you are working
with a team, the problem gets bigger. Gradle
makes it easier to manage dependencies.
Even if IDEs provide their custom build tools,
developers prefer to use it since it is easier
and more useful.
One of the most useful frameworks is
OrmLite. It provides simple fuunctionality for
persisting Java objects to databases.
OrmLite makes creating tables, setting up
database connections, and storing data in a
database easier (“OrmLite - Lightweight
Object Relational Mapping (ORM) Java
Package”, n.d.).
Android Annotations is another third party
framework that helps developers to reduce
code size by almost half. To access a UI
element from code, UI element has to have a
unique id. In regular Java syntax, the
developer has to declare type of the element
and call methods to find the item by id. With
the help of Android Annotations, creating a
variable with the same name as UI element id
and putting an annotation with “@” sign
followed by their tag for the element will be
adequate. A sample code comparison for an
animation element is demonstrated in Table
2.
Table 2 - Before and after Android Annotations
Before After
Animation fadeIn;
fadeIn =
AnimationUtils.loadAnim
ation(this,
anim.fade_in);
@AnimationRes
Animation fadeIn;
22. Android Application Development
16
C. Design
“Design is not just what it looks like and feels
like. Design is how it works.” says founder of
Apple, Steve Jobs (Walker, 2003). Designing
an application that looks nice to the user and
helps him to navigate through your
application is as important as developing
high performance application. User Interface
(UI) and User Experience (UX) are two key
components of design. In this section we will
introduce this concepts and explain its
importance for an Android app.
1. User
Interface
UI is everything that the users can see and
unteract with. It is how your application looks
like. Shape of buttons, colors of visuals, and
sizes of elements are all part of UI design.
Android provides variety of pre-build UI
components. All UI elements in Android are
built using View and ViewGroup objects.
The UI for each component of your app is
defined using a hierarchy of View and
ViewGroup objects.
It is possible to add UI components to your
application within the code, but the most
common and effective way of doing this is to
create an XML file and declare your
components inside the file. If you are using
an IDE for development, you can see a
preview of your design in Layout Editor,
which is an IDE plugin that helps developers
designing. Layout Editor has two view
options: 1.Text and 2.Design. Text view
shows XML code of visual components,
shown in Table 3. Developers can
add/remove components typing equivalent
XML code or make changes in the code.
Design view shows the actual design of the
page. It allows developers to design
dragging and dropping elements from a list
of pre-build components and widgets.
Figure 9 - Android Lollipop material design
Source: Google, 2014
Before development, reading Android Design
principles
(https://developer.android.com/design) is an
important step that gives us idea of how an
ideal Android app should look like) will give
an idea of how an ideal Android app should
be designed.
23. Android Application Development
17
Figure 10 – XML code for a sample Android design
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I am a TextView" />
<Button android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I am a Button" />
</LinearLayout>
2. User
Experience
“User experience (UX) focuses on having a
deep understanding of users, what they
need, what they value, their abilities, and also
their limitations” (“User Experience Basics”,
2012). Even if UX and UI are two different
terms, it might be confusing to distinguish
them from each other since they are closely
related.
Importance of UX comes from user
acquisition and engagement. Users tend to
prefer fast, smooth, usable, useful, desirable,
findable and credible apps. If your app
doesn’t conform to the users’ expectations,
they will not spend time with your app.
According to a study (“Mobile Apps: What
Consumers Really Need and Want”, n.d.)
about consumers’ expectations and
experiences of mobile apps, more than half
of users have experienced a problem with a
mobile app. When users encounter a
problem with your app,
• 48 percent of the users less likely to
use the mobile app,
• 34 percent of the users will switch to
competitor’s app, and
• 31 percent of the users will tell others
about poor experience.
The study also mentions importance of app
store reviews. It states that app store ratings
are important for 84 percent of users and it
will affect their decisions.
Evolution in Android’s design in past 6 years
have showed us how Android interprets user
feedback and reflects it back to user, to give
them the best experience. Android’s website
provides tutorials about the best practises for
user experience under “Interaction and
Engagement”
(http://developer.android.com/training/best-
ux.html) section.
D. Testing
Testing is important for every application
developed, but it has a significant importance
for mobile apps --especially Android apps.
The reason is that Android works on variety
of devices from different manufacturers, and
they all have products with various hardware
capabilities.
24. Android Application Development
18
1. Testing
To test an Android app, Android provides
test frameworks and “uiautomator” tool.
Android testing is based on JUNIT, a testing
framework for Java language, and learning
JUNIT will be necessary before writing test
cases for the app (“Testing”, n.d.).
Android separates testing to five different
categories. These categories are activity
testing, service testing, content provider
testing and UI testing.
Activity testing is one of the most important
one. It includes testing transition between
pages, app’s behaviors after switching to
another app and coming back, change of
device orientation, and input validation. Your
application has to be tested for all screen
sizes and resolutions.
Service testing covers testing your app’s
Service objects if any exists. Services in
Android are long-running operations in
background. For example, receiving an email
and getting notification about the email
happens with the help of Service object that
runs in the background, even if your email
app is not open at that moment. Testing
Services will prevent any kind of
disconnection between user and your app.
Content providers in Android are used for
storing data on the phone. Any kind of
information that needs to be stored in the
phone is saved to device’s database using
content providers. Untested content
providers might cause critical data losses. It
is important to save the data as soon as user
completes the action.
UI testing can be considered as UI and UX
testing. The goal is to make sure your
application gives the right responses to
actions, reflects correct visuals and data; and
ensure the user is directed to right pages. It
is hardest part of testing, and it takes long
time to test. You are responsible to test every
action, every button tap, every data input,
and page transition. Android recommends
automated UI testing with the help of a
testing framework. Automated testing
includes test cases for different scenarios.
For example, showing asterisks in password
input fields, submitting email addresses that
doesn’t contain “@” sign, and checking the
current page after leaving the app and
coming back can be considered as test
cases. Automating these test cases will save
time. Android’s uiautomator tool is an
automated UI testing tool that can be used
for finding and clicking on elements, swiping
the screen and more. Android also provides
“uiautomatorviewer”, a GUI tool that helps
analyzing UI components (“UI Testing”, n.d.).
2. Types
and
Challenges
This section will discover types of mobile app
testing challenges of mobile testing more in
detail. For example, the devices Android
supports differ from each other in their
screen size, resolution, keyboard support,
camera and some other distinct capabilities.
E. Distribution
The final step of app development is
delivering your app to to users. In iOS, the
only option is submission to the App Store.
Submission is free, however you have to
have paid developer account to be able to
do that. In Android, two options are available.
In this section we will explain these two
options.
25. Android Application Development
19
1. Google
Play
Google Play is Google’s online distribution
platform for apps developed with Android
SDK, music, magazines, books, movies, and
television programs. It was launched on
March 6, 2012 after Google’s decision on
merging Android Market, Google Music and
Google eBookStore (Rosenberg, 2012). As
of July 2014, Google Play is the leader of
mobile app stores with 1,300,000 Android
apps (“Number of apps available in leading
app stores as of July 2014”, 2014).
Submitting an app to Google Play is free,
however acceptance is not guaranteed for
every app submitted. On the other hand,
number of apps rejected by the Google Play
is less than the Apple App Store. It is a well-
known fact, between mobile developers, that
Apple is stricter at app submission compared
to Google Play. Google reserves the right to
reject your app if it doesn’t match their
criteria. Developers can follow the Launch
Checklist
(http://developer.android.com/distribute/tool
s/launch-checklist.html) before submitting
any app to Google Play, and make sure their
app fits to Google’s policies.
2. Custom
Install
Unlike Apple, Android’s app distribution is
not limited to app store. Users can install
third party apps to their device even if they
are not available in Google Play.
Figure 10 - Activating third-party app install
To protect users, default Android device
settings block users from downloading third
party apps. To install a third party app to an
Android device, users have to make a small
change in device settings. Since they are
non-market apps, Google labels them as
“Unknown Source”, while apps from Google
Play are labeled as “trusted”. To activate
custom installs, users have to go to
Unknown sources in Settings ->
Security and tap on checkbox, shown in
Figure 1 (“Alternative Distribution Options”,
n.d.).
After giving permission to third-party apps,
users can transfer .apk file to their phone via
email, a cloud based storage app, such as
Dropbox, or connecting their phone to a
computer. Opening .apk file will start app
installation. This option also opens the doors
of enterprise distribution. Some companies
use this option for their private internal apps.
Only users with permission can download
the app from company’s private server.
In addition to Google Play, there are other
app stores that host Android apps. Activating
third-party app installation will give users
chance to downlaod apps from these stores.
For instance, Amazon Appstore hosts
Android apps and distributes them through
their Amazon Appstore mobile app. As a
developer, submitting your app to other app
stores will create new markets (“Getting
Started with the Amazon Appstore for
Android”, n.d.).
26. Android Application Development
20
REFERENCES
Akiyama, Y. (Photographer). (2008, 06, 10). 2008 Google Developer Day in Japan - Press Conference: Andy Rubin.
[Web Photo]. Retrieved from http://www.flickr.com/photos/karitsu/2568944369/
Android NDK. (n.d.). Retrieved December 8, 2014, from https://developer.android.com/tools/sdk/ndk/index.html
Android Mobile HD Wallpapers. (2014, August 5). Retrieved November 1, 2014, from
http://www.hdwallpapersos.com/android-mobile-hd-wallpapers.html
Alternative Distribution Options. (n.d.). Retrieved December 8, 2014, from
http://developer.android.com/distribute/tools/open-distribution.html
Android Learning Logo. (2011, December 16). Retrieved November 1, 2014, from
http://www.androidapps.com/tech/articles/10501-android-takes-developers-to-school-with-new-courses
Amadeo, R. (2014, June 15). The history of Android. Retrieved November 3, 2014, from
http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-
googles-mobile-os/
Bonderud, D. (2014, February 10). The Android Operating System: 10 Unique Features. Retrieved November 6,
2014, from https://www.gazelle.com/thehorn/2014/02/10/the-android-operating-system-10-unique-
features/
Getting Started with the Amazon Appstore for Android. (n.d.). Retrieved December 8, 2014, from
https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000626391&ref_=mas_dl_appstore_rr
Google I/O 2013: What's New in Android Developer Tools. (2013, January 1). Retrieved December 7, 2014, from
https://developers.google.com/events/io/2013/sessions/324603352
Helft, M., & Markoff, J. (2007, November 5). Google Enters the Wireless World. The New York
Times. Retrieved December 5, 2014, from
http://www.nytimes.com/2007/11/05/technology/05cnd-gphone.html?_r=0
IDE Definition (n.d.). Retrieved December 7, 2014, from http://www.pcmag.com/encyclopedia/term/44707/ide
Industry Leaders Announce Open Platform for Mobile Devices. (2007, November 5). Retrieved November 1, 2014,
from http://www.openhandsetalliance.com/press_110507.html
Mobile app platform icons. Retrieved November, 3, 2014, from
http://coronalabs.com/blog/coronageek/html5-versus-native-apps/
Mobile Apps: What Consumers Really Need and Want. (n.d.). Retrieved December 9, 2014, from
http://info.dynatrace.com/rs/compuware/images/Mobile_App_Survey_Report.pdf
Mobile Continues to Steal Share of US Adults' Daily Time Spent with Media. (2014, April 20). Retrieved December 9,
2014, from http://www.emarketer.com/Article/Mobile-Continues-Steal-Share-of-US-Adults-Daily-Time-
Spent-with-Media/1010782
Number of apps available in leading app stores as of July 2014. (2014, July 1). Retrieved December 7, 2014, from
http://www.statista.com/statistics/276623/number-of-apps-available-in-leading-app-stores/
27. Android Application Development
21
OrmLite - Lightweight Object Relational Mapping (ORM) Java Package. (n.d.). Retrieved December 9, 2014,
from http://ormlite.com/
Rosenberg, J. (2012, March 6). Introducing Google Play: All your entertainment, anywhere you go. Retrieved
December 8, 2014, from http://googleblog.blogspot.com/2012/03/introducing-google-play-all-your.html
Smartphone OS Market Share. (2014, January 1). Retrieved November 3, 2014, from
http://www.idc.com/prodserv/smartphone-os-market-share.jsp
Stack Overflow Tags. (n.d.). Retrieved December 8, 2014, from http://stackoverflow.com/tags
Testing. (n.d.). Retrieved December 9, 2014, from
https://developer.android.com/tools/testing/index.html
The Most Intelligent Java IDE. (n.d.). Retrieved December 7, 2014, from https://www.jetbrains.com/idea/
The U.S. Mobile App Report. (2014, August 21). Retrieved December 6, 2014, from
http://www.comscore.com/Insights/Presentations-and-Whitepapers/2014/The-US-Mobile-App-Report
Top 10 Programming Languages. (2014). IEEE Spectrum. Retrieved from
http://spectrum.ieee.org/computing/software/top-10-programming-languages
UI Testing. (n.d.). Retrieved December 9, 2014, from
https://developer.android.com/tools/testing/testing_ui.html
Undergraduate Enrollment in Distance Education Courses and Degree Programs. (2011, October 1).
Stats in Brief, 1-14.
User Experience Basics. (2012, March 14). Retrieved December 9, 2014, from http://www.usability.gov/what-and-
why/user-experience.html
Walker, R. (2003, November 30). The Guts of a New Machine. Retrieved December 8, 2014, from
http://www.nytimes.com/2003/11/30/magazine/30IPOD.html
Wilson, M. (2008, September 23). T-Mobile G1: Full Details of the HTC Dream Android Phone. Retrieved November
2, 2014, from http://gizmodo.com/5053264/t-mobile-g1-full-details-of-the-htc-dream-android-phone
What is the best IDE to develop Android apps in? (2009, January 1). Retrieved December 7, 2014, from
http://stackoverflow.com/questions/1715697/what-is-the-best-ide-to-develop-android-apps-in