Mobile Developers Guide 18th Edition Web PDF
Mobile Developers Guide 18th Edition Web PDF
MOBILE DEVELOPER‘S
GUIDE TO THE GALAXY
published by:
Open-Xchange GmbH
Olper Hütte 5f
57462 Olpe
Germany
www.open-xchange.com
Customlytics GmbH
Schönhauser Allee 167 C
10435 Berlin
Germany
www.customlytics.com
18th Edition November 2019
This Developer Guide is licensed under the
Creative Commons BY 2.5 License.
Please send your feedback,
questions or sponsorship requests to:
[email protected]
Follow us on Twitter: @MobileDevGuide
1 Prologue
1 Prologue
We make the case that using SDKs of independent 3rd
party tool providers - in contrast to certain other “data
hunters”- will give app developers sovereignty and control over
their data. You can read more on this in the mobile analytics
chapter.
Of course, you will also still find tons of updated informa-
tion about how to create mobile software that is worth the
marketing effort. So make sure to read all the chapters and
understand how to convert your idea into code. Once you are
finished reading this edition of the Mobile Developers Guide,
we would like to hear your feedback. Please let us know what
content you think we may have missed or where you see room
for improvement. Or, even better, get involved and share your
knowledge by becoming a contributor for the next edition.
Cheers,
Marco / Open-Xchange & Christian / Customlytics
Bremen & Berlin November 2019
2 Prologue
Robert Virkus
Looking back into the past, the mobile scene looked a bit like
the home computer ecosystem in the 1980s: many players,
many operating systems, lots of innovation and changes. Today
we are dealing with a global duopoly: 98% of today's mobile
devices are running either on Android or iOS1.
Will this change? Without political pressure or a paradigm
shift we do not expect the situation to change for the
foreseeable future. Looking at the details, however, reveals an
exciting micro-cosmos of options, challenges & opportunities.
Notable Players
You should watch the following players carefully, obviously
depending on your market strategy and app/game/service
category. Of course, each of these players bring way more to
the table than just the mentioned products and services, but
these are the most relevant in the mobile segment that we
cover in this guide. Some of these players form global digital
leaders summarized by the GAFAM acronym, which stands for
Google-Apple-Facebook-Amazon-Microsoft.
Google
In the mobile industry Google's Android operating system
remains the major smartphone player - both by numbers and
by revenue.
Android has many variants like Android Go for lower end
smartphones, Android One promising regular security updates
Apple
Apple single-handedly created the smartphone market in
the first place with the iPhone and specifically with the
iOS operating system and the App Store in 2007 and 2008
respectively. Apple is also a leading tablet provider6 and leads
2 android.com/intl/en/one
3 source.android.com
4 flutter.dev
5 fuchsia.dev
6 Asof July 2019, iPads held 70% of the global tablet market: gs.statcounter.
com/os-market-share/tablet/worldwide/2019
Samsung
Being the biggest smartphone vendor, Samsung influences the
market to a large degree. Samsung is running Android mostly,
but they also work on the Tizen operating system - however,
so far every attempt to establish this OS in the smartphone
segment has failed. With DeX (Desktop eXperience)8 Samsung
fuses the tablet and PC market by supporting keyboard, mouse
and external monitors to work with selected hardware like the
Samsung Galaxy Note 10 handset.
Samsung also operates the Galaxy Store for app distribution
which can be an attractive alternative to the Google Play Store.
Facebook
Facebook provides the leading mobile messaging systems with
WhatsApp, Facebook Messenger and Instagram. FB Messenger
specifically provides easy extension options for developers
while Instagram recently introduced an AR extension called
Spark AR Studio. Facebook is also the main player of the Libra
cryptocurrency project and provides various other developer
tools. Rightfully Facebook is under pressure for its various data
and privacy breaches.
Amazon
Amazon is the leading smart speaker provider with Alexa,
which is extensible using skills. Amazon also uses its own
Android variant FireOS9 for its tablets and provides its own
Android app distribution platform Amazon Appstore. Amazon
also provides the leading cloud platform with AWS.
9 developer.amazon.com/de/android-fireos
TenCent
With WeChat and QQ Chat Tencent provides the third and
fourth biggest mobile messengers worldwide. With Mini
Programs, WeChat provides an important option to discover
services and games. WeChat Pay is one of China's leading
mobile payment systems.
KaiOS
KaiOS10 is an operating system aimed at low cost feature
phones and is based on the Firefox OS. It has gained sub-
stantial market share in some regions specifically emerging
markets11. With KaiStore you can distribute your HTML5 apps
easily.
Sailfish OS
Sailfish12 is around for quite some time and currently in its
third generation. Traction so far is limited, but thanks to an
Android compatibility it can run at least some Android AOSP
apps.
10 kaiostech.com
11 In India, KaiOS has a market share of >4% which makes it the second most
popular mobile operating system (gs.statcounter.com/os-market-share/
mobile/india).
12 sailfishos.org
Native Apps
A native app is programmed in a platform-specific language
with platform-specific APIs. It is typically purchased, down-
loaded and upgraded through the platform-specific central
app store. Native apps usually offer the best performance,
the deepest integration and the best overall user experience
compared to other options. However, native development is
often also the most complex development option. When start-
ing new apps you should consider using Kotlin for Android and
Swift for iOS, rather than Java and Objective-C. Find further
information on how to get started in the dedicated Android
and iOS chapters.
Cross-Platform Apps
There is a multitude of cross-platform services, that provide
write-once run-everywhere scenarios. Even when dealing with
only two dominant platforms, cross-platform tools can help
you to update and maintain your services with less effort. Read
the cross-platform chapter to understand your options in this
regard.
Flamewars
As developers, we tend to have a passion for our chosen
darlings. However, let us not forget that these technologies
are just that - technologies that are relevant at a given time
and in a given space, but not more. Yes, flamewars are fun but
in retrospect, they are always silly. Hands up those who fought
about Atari versus Amiga back in the good ol' 80s! Probably
13 developers.google.com/web/progressive-web-apps
14 developer.apple.com/library/content/documentation/AppleApplications/
Reference/SafariWebContent/ConfiguringWebApplications/
ConfiguringWebApplications.html
15 fairphone.com
16 shiftphones.com
17 guardianproject.info
1 youtu.be/DmJXpI7OJuY
2 To learn more about the Jobs To Be Done innovation perspective, read this
free ebook by Alan Klement: whencoffeeandkalecompete.com
19
Why is understanding people's desires
for progress important for innovation?
Companies usually focus their research efforts on understand-
ing the quality of their users' experience. They might collect
usage analytics across different steps of the user journey,
analyze their sales funnel, collect and sort frequent feature
requests etc. While this data is immensely helpful and should
definitely be gathered to improve the quality of the user's ex-
perience4, one must understand that this is not the only data a
company should collect, especially when challenged with new
product development, scope creep challenges and growth.
The problem stems from the sampling bias5 inherent to
collecting data that originates only from analyzing the current
product's usage. When only talking to people who already use
the current version of the product, one can easily forget about
people who are not customers yet and who might have left the
product (churners). This practice leads the team to focus on
improving of what already is (optimize and innovate incremen-
tally), rather than thinking of something radically different
(think gene-modified seeds as opposed to an improved lawn
mower). This can inhibit growth and lead to bloated or highly
specialized products for a small group of vocal users. Collecting
only so-called 'data for quality improvement' does not allow
teams to think beyond what already is and reimagine products
radically, opening up space for unbiased competition and
disruption.
The Jobs to be Done perspective provides a helpful way for
analysis of underlying motivations, goals, constraints and other
factors that create and influence demand for a new product
4 see the Analytics chapter to learn more about this important aspect
5 en.wikipedia.org/wiki/Sampling_bias
Unmet Goals
Unmet goals describe experiences we want or want more of,
but cannot have at the moment because of constraints. The
goals can have various types, for example:
Constraints
Constraints prevent us from fulfilling our unmet goals and
make progress. They create a discrepancy between where I
want to be and where I am now. Constraints usually relate to
unmet goals directly. The types of constraints can be:
6 Read more in 'The Jobs to be Done Data Model' by Alan Klement: jtbd.info/
the-jobs-to-be-done-data-model-b270f6fc445
Choice Set
The choice set describes everything that people consider hiring
to make progress towards their unmet goals or overcoming
their constraints. These can be products and services, but also
behaviors or combinations of products and services. Imagine
you wanted to impress friends at a dinner. You might choose
a delicate wine, but you could also bring a surprise or a great
story.
1. How did you think things would be better for you person-
ally once you had the product in place?
2. How did you think things would be better for your
company or your customers?
3. Did you have any problems convincing others to use our
product?
4. What other things were happening within your company
during this timeline? Were there any changes in leadership
or strategic direction? Did any of these influence the
decision to start using our product?
5. Once you started using the product, how did you know
things were progressing as you had hoped (or not)?
Who to interview
It is important that you talk to people who have already
bought and used your product who have a somewhat fresh
memory of all the important tradeoffs and circumstances that
shaped their decision. Because people are prone to rational-
ize their decisions, avoid talking to customers who are only
thinking to buy but did not commit yet. Similarly, talking to
people who got a product gifted will not reveal any valuable
insights — they simply did not spend any energy thinking about
it. You will use the story of the shopping and decision-making
process as a tool to identify customers whose motivations have
undergone the test of reality, getting a clearer view on their
actions as opposed to their aspirations and beliefs.
As a guide: Interview customers who switched to your
product in the last 90–120 days. They will not be in love with
the brand-new product anymore and will have had time to
evaluate if they were able to reach the desired progress or not.
7 whencoffeeandkalecompete.com
8 slideshare.net/AndrejBalaz/improving-personas-with-jobs-to-be-done
9 intercom.com/books
10 blog.intercom.com/accidentally-invented-job-stories
11 blog.intercom.com/how-we-build-software
12 theleanstartup.com/principles
34
Google Ventures Design Sprint
The design sprint methodology by Google13 helps you to
develop a tested prototype within 5 days. If you follow Design
Sprint 2.0 by AJ&Smart14, you can run it in 4 days. It does
require user research before you start, but if you followed
our suggestions so far, you should be equipped to start it
right away. In the beginning of the week you decide on scope
and the experience you want to design, then you progress to
ideation, sketching and building of a testable prototype. By
the end of the week you will have tested your idea with real
users, gathering invaluable feedback about your idea.
The Design Sprint will get you a good overview of various
helpful methods that you can apply to prototyping and sketch-
ing. In the following section let us highlight a few methods
that will help you to transform your idea into a more coherent
concept.
13 gv.com/sprint
14 youtube.com/watch?v=Z8MOwcqZuuU
— Sketch: sketchapp.com
— InVision: invisionapp.com
— Marvel: marvelapp.com
36
High-fidelity prototyping with Framer, Principle
If you are looking into prototyping animated flows and transi-
tions that feel like the real thing and are programmed, Framer
will be your first choice. Framer is based on React, which is a
complex web framework with a steep learning curve, but can
therefore easily transfer prototypes into the real-world environ-
ment. If you prefer to postpone any coding, Principle provides
you with a simple interface to make interactive prototypes
reality. It has its limitations when your prototype requires
many states, so be prepared to “fake” things a lot. Both tools
are well-documented and integrate well with Sketch.
— Framer: framer.com
— Principle: principleformac.com
— Zeplin: zeplin.io
— InVision: invisionapp.com/craft
— Affinity: affinity.serif.com
— Adobe XD: adobe.com/products/xd.html
Visual Design
Unless you are building an app that uses a non-visual
interface, your app’s UI will rely on graphical elements, anima-
tions, colors, illustrations and to the largest extent typography.
You probably clarified conceptual aspects of user interface
design in the prototyping phase. You decided on where to
place interface elements and what copy to write so that the
user can progress through the app with as little friction as
possible. It is a good practice to also think about the size of
visual elements and typography while prototyping and creating
wireframes. Common mistakes include making copy too small
and hardly legible, cluttering screens with too many elements
and not thinking of animations and transitions. Tools such as
InVision or Marvel help you to wireframe directly on the device
and streamline your navigation flow and typography very early.
15 learndesignprinciples.com
16 airsquirrels.com/reflector
17 lookback.io
Android Development
The Ecosystem
BY
1 gs.statcounter.com/os-market-share/mobile/worldwide
2 theverge.com/2019/5/7/18528297/google-io-2019-android-devices-play-
store-total-number-statistic-keynote
3 statista.com/statistics/276623/number-of-apps-available-in-leading-app-
stores
45 Android Development
Beside the big players like Google and Amazon, also so
called custom ROMs, developed by the Android community
or other companies can be used. Those often use alternative
stores to provide apps. An example is the F-Droid4 store, which
only allows open source apps. Utilizing those, allows Android
users to get a Google free experience if preferred. The Android
ecosystem is a huge and flexible system for software on differ-
ent hardware devices.
Due to a huge amount of manufactures, devices and
adaptations of Android, one of the biggest problems of the
platform is the fragmentation of the used versions. This leads
to uncertainty over whether or not your Android application
will run everywhere and often requires additional work by the
developers. Furthermore, the adaption of the latest OS version
is slower compared to other mobile platforms. However, in the
last years Google increased efforts to reduce the fragmentation
and today you will reach around 90% of the installation base if
you decide to target 5.0 Lollipop or above5.
4 f-droid.org
5 developer.android.com/about/dashboards
Lollipop 5.0
API: 21
3.0% Kitkat 4.4
Marshmallow 6.0 API: 19
API: 23 6.9% Nougat 7.1
16.9%
API: 25
7.8%
Pie 9
Oreo 8.1 API: 28
API: 27 10.4%
15.4%
Nougat 7.0
API: 24
11.4%
Oreo 8.0
API: 26 Lollipop 5.1
12.9% API: 22
11.5%
Recent Versions
Once a year Google releases a new Android version with
features, improvements and security fixes. This also means new
possibilities and challenges for developers. In preparation for
updates, developers should also check for usage of deprecated
or removed SDK functions or APIs, to avoid incompatibilities.
47 Android Development
Android 9 (Pie)
Android 9 (codename: Pie) was released in August 2018. With
the Adaptive Battery and Brightness features, Android 9 auto-
matically adjusted apps, services and the brightness depending
on the users habits, to further extend the battery time.
It also introduced App Actions6: Powered by machine learn-
ing, Android tries to predict user behavior and offers shortcuts
based on detected individual usage patterns.
The interaction model for recent apps, which allowed users
to quickly switch between apps was another new feature of
Android Pie.
Just like iOS, Android also allows users to keep an eye on
their screen time since this release: A dashboard was added to
visualize the number of times apps where used. Users can also
limit usage times for apps and enable automatic grayscale or
Do Not Disturb mode.
As notch hardware designs are getting more and more
traction Android 9 was the first Android version supporting it.
From a developer's point of view, the most relevant news in
Android 9 included new indoor navigation features using indoor
positioning with Wi-Fi RTT and enhanced notifications, e.g. the
new Person class, which allows providing richer information.
It is now also possible to access cameras simultaneously
and create for example streams with picture in picture content.
A new image decoder, a class for image animations, better
codecs and media APIs aim to provide developers more options
to create optimized multimedia applications. The Neural
Networks API was also updated to provide more operations.
6 developers.google.com/actions/app
48 Android Development
Android 10
With the most recent Android release in September 2019,
the naming scheme has changed. Google has long named its
Android software after sweets. These times are over. To avoid
confusion, the latest version is simply called Android 10
without any additional codename.
Android 10 brought support for foldable phones as well as
native support for theming, including the popular dark modes
some apps provide. Users now also have access to a native
screen recorder and an all new floating settings panel.
Another interesting feature from a user's point of view is
the new sharing option: Android 10 provides specific shortcuts
to share content directly to contacts.
If your app needs permission to access certain user data,
be aware that Google increased security by limiting location
access. This adds new permission handling for background
interactions and limits the access to device identifiers.
And if you are working on media apps, there are some good
news for you: Android 10 supports multiple new multimedia
codecs and provides a native MIDI API to interact with music
controllers. It is now also possible to capture audio output
provided by other apps.
Android 10 allows the developer to provide peer-to-peer
network connections e.g. for setups with other devices. To
configure things like the network or the volume the mentioned
floating settings panel can be triggered by the developers, to
grant changing configuration without leaving the app context
completely.
49 Android Development
An optimized handling for the creation of files on external
storage were added, which informs about a pending creation or
helps to store specific file types in the appropriate directory.
To provide an enhanced real-time experience while gaming
or during other interactions, the Wi-Fi high-performance
and low-latency modes can be used. While doing so the new
Thermal API helps to keep track of temperature and load of the
device.
Hardware Adaptations
Android is not only a smartphone operating system but also a
car entertainment system and operating system for wearables
and TVs. To adapt to different form factors, controls and
usage areas, and to mitigate possible limitations, like e.g. no
touch input, multiple variations of the Android system were
implemented.
Wear OS
Wear OS7, previously known as Android Wear, is Google's
adoption of Android for smartwatches. It provides a simplified
interface, as smartwatches provide much smaller displays than
smartphones. Therefore, voice controls are playing an impor-
tant role in this context. Wear OS is mostly used in combina-
tion with a connected smartphone, even if Wear OS devices
can technically be equipped with their own SIM card. A key
feature is the Google Fit ecosystem of apps that support run
and ride tracking, heart activity, step-counting, etc. Users can
use their watch to control their phone – music, for example.
Notifications via the vibration engine are another key element.
Those can be used for notifications from Google Now like flight
reminders, traffic warnings, meeting reminders, etc.
7 wearos.google.com
50 Android Development
Android TV
Android TV8 provides an adoption of the operating system in
regards to big screens and non existing touch interactions. A
much bigger interface with simplified controls, usable with
remote and voice controls was added. It is also possible to
control the TV via the smartphone. One of the most important
use cases of Android TVs is the usage of streaming apps like
Youtube and Netflix. Some Android TVs also provide direct
support for the Chrome Cast Receiver, so users can mirror their
screen or stream content directly from their phone or the web
to the device.
Android TV apps use the same structure as those for
phones and tablets. Developers can thus leverage their
existing apps and knowledge to target the TV platform. See
developer.android.com/tv to learn how.
Android Auto
As smartphones are often used as navigation devices, Android
Auto9 was developed as an adjusted version of Android, which
allows to display content on the car's internal screen. Doing
this enables a special user interface focused on navigation,
communication and entertainment. Interactions are often
performed via voice commands to allow the driver to focus on
the street.
Software Adoptions
The Android ecosystem allows vendors to extend or change the
default behavior and design provided by the system in many
regards. Some vendors, like Samsung or Amazon, often provide
8 android.com/tv
9 android.com/auto
51 Android Development
a completely customized user interface or even different
implementations of base functionality on their devices.
This leads to vendor specific ecosystems and different user
experiences across the Android ecosystem. This comes with an
upside, for instance a very tight integration which provides
an amazing experience for users, and also a downside, such as
increased fragmentation of the ecosystem.
Google is providing a vendor interface to mitigate incon-
sistencies, while also providing vendors some flexibility. This
should also help to decrease the time-to-update for system
updates. The interface is meant to be used by vendors who
want to adjust the look and feel of their Android version, but
it is not feasible if a total conversion is planned, like Amazon
did with Fire OS.
Android One
Android One is Google's attempt to provide a pure Android
experience with the latest software updates for two years and
security updates for three years. Android One was introduced
in 2014 and is meant to be a secure and consistent Android
version for everyone. This version can be treated as vanilla
Android with some extra optimizations by Google.
Android Go
Android Go is a lightweight version of Android which has been
developed to provide a smooth performance also on low-end
devices. It is designed to run on smartphones that have 1 GB
or less RAM. Even apps on the Play Store will be optimized for
these devices mostly targeting emerging markets like India or
China. Core features are data saving, less storage requirements
and better performance on low-end devices.
52 Android Development
Getting Started
The Android operating system is based on free software and
uses a Linux kernel as a base. The most important layer
for developers is the Java Runtime Environment above the
OS layer. The so called Android Runtime (ART) allows the
execution of APK files. Those are created by compiling Java or
Kotlin code via the OpenJDK for Android. This is the main way
to create apps for the Android platform. C or C++ code is also
possible via native libraries. Especially resource intense compo-
nents like multimedia codecs, browser engines, and database
encryption layers utilize this approach.
During the Google I/O 2019 conference, Kotlin has been
declared the main language for Android development. It should
replace Java. However, it is also possible to mix both in one
project.
The Kotlin language is developed by JetBtrain, the creators
of IntelliJ Idea. It provides a more modern, safe and concise
approach to create Android apps. Kotlin code can be compiled
to Java byte code and also JavaScript code. Even if Kotlin is
progressively replacing Java, Java is still a well-established
platform for developing Android apps. But beware, only a
subset of the Java libraries and packages are supported and
there are many platform specific APIs that will not work
with Android. You can find answers to your "What and Why"
questions online in Android's Dev Guide10 and your "How"
questions in the reference documentation11. Furthermore,
Google introduced two sections in their documentation called
10 developer.android.com/guide
11 developer.android.com/reference
53 Android Development
"Codelabs"12 and "Courses"13 that help new developers learning
various best practices for Java and Kotlin. This is where you
can learn about basics such as navigation and inter-app
communication, as well as more advanced features such as
intelligent Bitmap downloads and optimizing your app for
better battery life. Experienced developers are able to acquire
the Associate Android Developer Certification by Google14 .
To get started, you need the Android SDK15, which is avail-
able for Windows, Mac OS X, and Linux. It contains the tools
needed to build, test, debug and analyze apps. Development is
done within an adapted version of the IntelliJ Idea16 IDE. This
Tool is called Android Studio17 and allows besides developing,
also automatic building, syntax checking and testing.The latest
Android Studio versions are bundled with all required tools and
components to quick start Android development.
IDE support
Android Studio is the official IDE for Android and comes
directly with Gradle Support and many features explicitly
tailored to Android development. It is available as pre-packed
download including the Android SDK. An extended feature
list18 as well as an end user documentation19 can be found
on the official Android Studio website. Android Studio itself
comes with example code and provides code documentation
12 codelabs.developers.google.com/?cat=Android
13 developer.android.com/courses
14 developers.google.com/training/certification/
15 developer.android.com/studio#command-tools
16 jetbrains.com/idea
17 developer.android.com/studio
18 developer.android.com/studio/features
19 developer.android.com/studio/intro/index.html
54 Android Development
for all system classes and methods available. Android Studio
supports also latest Kotlin development features and enables
the developer to utilize the modern, safe and concise features
of Kotlin.
To measure performance the Android Profiler allows you to
keep track of CPU + RAM + GPU usage and the Network Profiler
lets you inspect packages send over your wireless connections.
Native development
The Android NDK20 enables native components to be written
for your apps by leveraging both JNI for invocations of native
methods and using native subclasses that offer callbacks to its
non-native pendants. This is important for game developers
and anyone who needs to rely on efficient processing.
20 developer.android.com/tools/sdk/ndk
55
Implementation
App Architecture
Android apps usually include a mix of Activities, Fragments,
Jobs, Services, BroadcastReceiver, ContentProvider and more;
these all need to be declared in the application's manifest. The
manifest also includes the metadata of an application, like the
title, version and its required permissions.
An Activity is a piece of functionality with an attached user
interface. Fragments can be used to split Activities into smaller
and reusable parts. A Service or Job is used for tasks that run
in the background and, therefore, are not tied directly to a
visual representation. A BroadcastReceiver handles messages,
broadcasted by the system, sent by your own or other apps. A
ContentProvider is an interface to the content of an applica-
tion that abstracts from the underlying storage mechanisms,
e.g. SQLite.
An application may consist of several of these components,
for instance, an Activity for the UI and a Service for long-
running tasks. Communication between the components is
achieved by Intents or remote procedure calls handled by
Android Interface Definition Language (AIDL).
Intents bundle data, such as the user’s location or an
URL, with an action. These Intents trigger behaviors in the
platform and can be used as a messaging system in your app.
For instance, the Intent of showing a web page will open the
browser. A powerful aspect of this building block philosophy is
that any functionality can be replaced by another application,
as the Android system always uses the preferred application
for a specific Intent. For example, the Intent of sharing a web
page triggered by a newsreader app can open an email client
or a text messaging app, depending on the apps installed and
56 Android Development
the user’s preference: Any app that declares the sharing Intent
as their interface, may be used.
The user interface of an app is separated from the code
in Android-specific XML layout files. Different layouts can
be created for different screen sizes, country locales and
device features without touching the actual code. To this end,
localized strings and images are organized in separate resource
folders. Of course, you are also able to define and design
layouts in code or make use of both strategies to enable
dynamic UI updates.
Android Jetpack
Android Jetpack bundles components for developers to program
faster and more robust apps. It contains tools, libraries and
multiple other components to simplify development and
provide backward compatibility to older Android versions.
Some of the core parts are the foundation components,
which provide Kotlin language support and backward compat-
ibility and the Architecture components which help you to
structure your app in a proven way. Also important are the
Behavior components, those provide easy and stable access to
the Android permissions system and the Google Assistant.
The UI components will help you to create more beautiful
apps without writing more code.
Every new and existing Android developer should at least
have a look if some of the modular designed components,
usable via the androidx.* libraries, could be useful for his/her
projects.
Material Design
Androids basic design language "Material Design" was intro-
duced in 2014. Designer Matías Duarte explained the basic
idea: "Unlike real paper, our digital material can expand and
57 Android Development
reform intelligently. The material has physical surfaces and
edges. Seams and shadows provide meaning about what you
can touch."
Material Design brought a strong, consistent visual identity
to the Android ecosystem, parallel but distinct from iOS's
flat design and Windows' Metro design. To encourage a solid
user experience and consistent appearance of Android apps,
Google provides a comprehensive documentation for the design
language21 and a design guide for developers22 . Going into the
importance of color schemes, design patterns, and Material
Design, the guide provides a great orientation when building
apps for the Android ecosystem.
Material Design also forms the basis for the operating
system's UI and the system apps. Additionally, a variety of
libraries brought support for Material Design to other different
platforms, like the web.
Theming is also supported while still adhering the Material
Design guidelines. One example for this is the Basil theme23.
21 material.io
22 developer.android.com/design
23 material.io/design/material-studies/basil.html
58 Android Development
— emulator: To emulate the defined features of a virtual
device. Due to fast snapshot startups and hardware
acceleration the emulator is very helpful for daily develop-
ment routine.
— sdkmanager: To install and update Android SDK compo-
nents.
24 developer.android.com/training/constraint-layout
25 developer.android.com/google/play-services
59 Android Development
latest performance improvements and feature updates while
developing.
To provide push notifications, analytics, machine learning
capabilities and crash reports Google Firebase26 could be a
solution worth investigating. Firebase provides a huge set
of functions which are easy to integrate into Android Studio
projects.
Testing
The first step in testing an app is to run it on the emulator or
a device. You can then debug and analyze it via Android Studio.
All versions of the Android OS are built to run on devices
without modification, however, some hardware manufacturers
may have changed pieces of the platform. Therefore, testing on
a mix of devices is essential. To get an idea of which devices
are most popular, refer to AppBrain's list27.
The Android Testing Support Library provides a collection
of modular tools to cover most test scenarios. JUnit4 is the
foundation for all unit tests, Espresso28 provides a very lean
API that helps to quickly write procedural tests for your UI and
the AndroidJUnitRunner29 helps you to execute your tests.
Tests can be written using the standard JUnit format, using
the Android mock objects that are contained in the SDK. Ad-
ditional libraries like Mockito can help to increase performance
while creating Android unit tests30.
To automate testing, the Android SDK comes with some
26 firebase.google.com
27 appbrain.com/stats/top-android-phones
28 developer.android.com/training/testing/espresso/
29 developer.android.com/training/testing/junit-runner
30 developer.android.com/training/testing/unit-testing/local-unit-tests
60 Android Development
capable and useful testing instrumentation tools. The UI
Automator31 requires Android 4.3 (API level 18) and will
present you the captured device interface including some
information about the views presented. Executing the tests
is relatively easy: After you have written your test, it can
be build, executed and delivered to the device or emulator
directly from within Android Studio.
MonkeyRunner32 is a powerful and extensible test automa-
tion tool for testing the entire app. These tests can be run on
both virtual and physical devices. The tests written in Python
can monitor the UI by creating screenshots and sending
system events such as key presses. Your tests can then check
the status of your app after these events have occurred.
Open source testing frameworks, such as Robotium33, can
complement your other automated tests. Robotium can even
be used to test binary APK files if the app's source is not
available. Roboelectric34 is another great tool which runs the
tests directly in your IDE in your standard/desktop JVM.
Your automated tests can be run on continuous integration
servers such as Jenkins or Hudson. Roboelectric runs in a
standard JVM and does not need an Android run-time environ-
ment. Most other automated testing frameworks, including
Robotium, are based on Android's Instrumentation framework
and will need to run in the respective JVM. Plugins such as the
Android Emulator Plugin35 enable these tests to be configured
and run in Hudson and Jenkins.
31 developer.android.com/training/testing/ui-automator
32 developer.android.com/studio/test/monkeyrunner
33 github.com/RobotiumTech/robotium
34 robolectric.org/
35 wiki.jenkins.io/display/JENKINS/Android+Emulator+Plugin
61 Android Development
Building
Aside from building your app directly in the IDE of your
choice, there are also more flexible ways to build Android apps.
Gradle36 is the officially supported build automation tool for
Android. There is also a Maven plugin37 which is well-supported
by the community. Both tools can use dependencies from
different Maven repositories, for example, the Maven Central
Repository38.
The Gradle build system provides a huge selection of
configuration possibilities. It is possible to use different
flavors to build e.g. a free and a paid version of the app, while
a general differentiation between debug and release builds is
also possible. Mostly everything can be configured within your
build.gradle file, which enables the developer to also automate
the building process.
To shrink the size of apps and to obfuscate the code the
new R8 compiler39 can be used out of the box within your
Gradle build pipeline.
To reduce the size of apps even further Google introduced
Android App Bundles40, which contain the compiled code
and resources, but generate and sign APKs especially for the
requirements of the requesting devices. This happens directly
on Google Play if an App Bundle is provided.
36 developer.android.com/studio/build
37 simpligility.github.io/android-maven-plugin/
38 search.maven.org/
39 developer.android.com/studio/build/shrink-code
40 developer.android.com/guide/app-bundle
62 Android Development
Signing
Your apps are always signed by the build process, either with a
debug or release signature.
The same signature must be used for updates to your app
- so make sure to not lose the keystore file or the password.
Remember: you can use the same key for all your apps or
create a new one for every app.
Google also provides a centralized solution for signing.
Google Play App Signing41 hands over a lot of the work to
Google's infrastructure and could reduce problems with manag-
ing and securing the needed keys.
Distribution
After you have created the next killer application and tested
it, you should upload it to Android's app store called "Play" at
play.google.com/apps/publish.
You are required to register with the service using your
Google Checkout Account and pay a $25 registration fee. Once
your registration is approved, you can upload your app, add
screenshots and descriptions, then publish it.
Make sure that you have defined a versionName and
versionCode in your build.gradle and an icon, a label
and the required permissions in your AndroidManifest.xml.
The Google Play Store provides, beside production rollouts,
also alpha and beta testing plus staged rollouts. This allows
you to do some friendly user testing before publishing the app
to all users. Furthermore, you can target specific countries and
devices by setting the right flags in the Developer Console
41 developer.android.com/studio/publish/app-signing.html#app-signing-
google-play
63 Android Development
and export detailed statistics that help in understanding your
userbase. Using the inbuilt localization service, you can easily
add new languages to your app by paying a fee - make sure
to check the Localization Checklist42 for detailed information
about the importance of this topic.
As there are lots of competing applications in Android
Play, you might want to use alternative application stores.
They provide different payment methods and may target
specific consumer groups. One of those markets is the Amazon
Appstore which comes pre-installed on the Kindle Fire tablet
family. But you should keep in mind that alternative play
stores force the user to enable unknown sources for app instal-
lation, which is always a potential security risk.
And make sure to read the chapter about app store
optimization in this guide to pave your road to success.
Monetization
Google Play is the main distribution channel and of course the
most popular platform for Android app distribution. Google
charges you $25 for the registration and a transaction fee of
30% of your earnings.
But the Play Store is not your only option. For the vendor
specific ecosystems, such as Samsung Apps or Amazon's
Appstore, you should consider using their SDKs to enjoy the
benefits of optimized monetization.
In addition to selling an app in one of the many app stores
available, there are several different ways of monetizing an
Android app. One suitable way is by using advertising, which
may either be click- or view-based and can provide a steady
income. Other than that, there are different In-App Billing
42 developer.android.com/distribute/googleplay/publish/localizing.html
64 Android Development
possibilities such as Google's own service43 that utilizes the
Google Play Store or Square's In-App Payments SDK44 .
Most services differ in transaction-based fees and the
possibilities they offer for example subscriptions, parallel
payments or pre-approved payments.
Be sure to check that the payment method of your choice,
is in harmony with the terms and conditions of the differ-
ent markets where you want to publish your app to. Those
particularly for digital downloads, for which different rules
exist, are worth checking out.
Again: There is of course a dedicated chapter about moneti-
zation in this guide as well. So go ahead and read further.
43 developer.android.com/google/play/billing/
44 squareup.com/us/en/developers/in-app-payments
Swen Hutop & Dennis Kluge
iOS Development
In 2007, Apple introduced the iPhone and significantly
changed the way we perceive and interact with mobile phones.
Besides the device itself, two other factors made a significant
contribution to its success. Firstly, the new iOS operating
system, which had been radically designed for gesture-based
BY
1 macrumors.com/2019/02/25/ios-12-installed-on-83-percent-of-devices
2 developer.android.com/about/dashboards
67 iOS Development
still be updated to iOS 13. Another aspect that Apple attaches
great importance to, is security and privacy. In iOS 13 for
instance, you can use your personal Apple ID, to securely log
in to websites, as it is also possible with the Facebook login.
The significant difference here is that only randomly generated
data is made available to the apps.
3 developer.apple.com
4 developer.apple.com/programs
5 see aruniphoneapplication.blogspot.com/2017/01/ios-architecture.html
6 developer.apple.com/xcode
68 iOS Development
you are looking for an alternative we recommend to take a look
at JetBrain's AppCode7.
Xcode lets you easily create a new project; multiple
templates for iOS, iPadOS and watchOS apps are available.
After having chosen your target, you have to provide an App
ID. This unique identifier is used to distinguish your app from
others. It can be created through the Apple Developer Portal.
Furthermore, it is necessary to create keys to sign your applica-
tion. This process makes sure that the app originates from you,
as a verified developer. Nowadays Xcode handles this whole
signing procedure automatically8.
The primary app programming language is Swift9. It is
a fairly new multi-paradigm language released in 2014 by
Apple, which created a lot of traction over the last years. The
predecessor was Objective-C10 an object-oriented interpretation
of the C language.
The main pattern used for development is MVC – Model
View Controller11. However, different approaches like MVVM
(Model-View-ViewModel) or even reactive programming are pos-
sible. The latter gained more and more traction after Apple's
release of SwiftUI and the Combine framework. Both are more
explained in a sub-chapter.
A lot of iOS apps are known for their clean and beautiful in-
terfaces. Those can be developed by using Interface Builder12,
a tool provided by Xcode which lets you interactively configure
your view. Another way is to declare the user interface within
7 jetbrains.com/objc
8 developer.apple.com/de/support/code-signing
9 docs.swift.org/swift-book
10 en.wikipedia.org/wiki/Objective-C
11 en.wikipedia.org/wiki/Model–view–controller
12 developer.apple.com/xcode/interface-builder
69 iOS Development
your Swift code. Both ways are proven and sufficient. Apple's
Human Interface Guidelines13 provide rules and standards for
apps and their interfaces. It is a worthwhile read, especially
for beginners.
A huge platform like iOS brings the advantage of a big
developer ecosystem. Many libraries are open-sourced and can
be integrated into your app. Cocoapods14 is a tool which lets
you integrate third-party code within your iOS project. For
example, if you need to add the Instagram API in your new
app, there is a pod for it.
Apps can be tested on an iPhone device or through a
simulator. Xcode provides a tool which lets you run your iOS
code on macOS. You are able to choose between different OS
versions and device types. It does not completely replace test-
ing on the device itself, but provides a convenient workflow.
It especially reduces waiting time as Xcode has to compile and
package the app every single time you want to start a test
after a change has been made.
Many aspects need to be covered while developing an app.
This incorporates things like unit testing and performance
measuring. With XCTest and Profiler, Apple provides tools which
already cover these aspects.
We dedicated a whole subchapter about the aspects of
distribution and monetization, since many different ways
and methods exist. It is important to understand that some
restrictions and clear guidelines exist.
Starting iOS development comes with some entry barriers.
These include the knowledge of Swift and some general under-
standing on how UI applications are developed. Fortunately, a
huge variety of open resources already exist. Those are covered
13 developer.apple.com/design/human-interface-guidelines/ios
14 cocoapods.org
70 iOS Development
in an extra part. It is worth the effort to become a part of one
of the most interesting markets today.
iPadOS
With the first version of iPadOS15, publicly released in autumn
2019, Apple's tablet got its very own operating system variant
- which previously ran the same OS as the iPhone devices. With
iPadOS, Apple has succeeded in allowing the iPad to make an
enormous leap forward in terms of professional use. First and
foremost, multitasking options have been hugely extended.
In addition to Picture-in-Picture and Split View, Slide Over
functionality also allows switching between apps very quickly.
Another long awaited feature is the option to access con-
nected USB hard drives and SD cards directly via the native
Files app.
Other important new features of iPad OS 13 include:
Multiple Windows
Multiple window support for iPads16 introduced the possibility
to open several windows of one app simultaneously on an iPad.
For example, you can simply move an app icon from the dock
to the side of the screen to select existing windows or open a
new one.
The system offers two different types of windows: The
primary window, which can contain multiple app objects and is
used by users over a longer period. And secondly, the auxiliary
window. This can only contain a single object of an app.
Usually, it only comes in use to perform a single action before
15 developer.apple.com/ipad
16 developer.apple.com/design/human-interface-guidelines/ios/system-
capabilities/multiple-windows
71 iOS Development
closing the auxiliary window. For example, in the Mail app, the
primary window can be used to display the inbox, whereby the
auxiliary window is just used to write a mail.
17 developer.apple.com/documentation/uikit/drag_and_drop
72 iOS Development
SwiftUI
Apple introduced SwiftUI18 on their annual WWDC (Worldwide
Developers Conference) in 2019. This hails a new approach to
developing user interfaces for all Apple platforms. As a conse-
quence, it is now possible to develop SwiftUI user interfaces
for watchOS and therefore for the smallest display Apple offers,
right up to tvOS for large TV displays.
Therefore, SwiftUI uses a declarative syntax. This means it
helps to describe what happens after inputs and UI respond to
these actions. This simplifies the code that is written, facili-
tates understanding and increases readability. Even animations
are much easier to integrate in SwiftUI.
Xcode 11 includes new intuitive design tools that allow
developers to utilize SwiftUI to develop new user interfaces.
Changes made in code can even be directly previewed there.
Similarly, changes within the preview directly manipulate the
Swift code. This allows programmers to adapt parts of the app
dynamically, since they are constantly being compiled and
executed. Compared to the current state, this represents an
enormous step forward. Previously, by comparison, the app
had to be transferred to the iPhone or the simulator after each
adjustment to view the changes. SwiftUI and Xcode 11 make
it possible for you to open several previews at the same time
to test various configurations, such as different text sizes,
languages or dark mode.
18 developer.apple.com/xcode/swiftui
73 iOS Development
Catalyst
The booming mobile device market has led to a decrease in
popularity of Apple's macOS desktop operating system for
developers. At the same time, the technical foundation for the
development of apps on the individual mobile and desktop
platforms has become increasingly divergent. The decisive
factor for the success of iOS has been UIKit. This technology
represents the foundation for the interface experience we have
come to expect from Apple. On the other hand, macOS apps
are still based on the UIKit predecessor AppKit. This means
that iOS apps could only be ported to the desktop environment
with a great deal of effort. All of this has led to a decreased
popularity of macOS among developers.
During the WWDC in 2019, Apple announced their action
plan to address this: Project Catalyst now unites the mobile
and the desktop platforms19. Catalyst is supposed to make
it easy to port iPadOS apps to macOS20 by adapting the user
interface and the interpretation of the inputs. For example,
touch gestures are automatically translated into mouse
interactions.
As an investment in Apple's mobile platform, this means
that new markets and synergies are created with little extra
effort. Creating an iPad app, automatically means that a macOS
app can also be created. It also implies, that new target
groups can be addressed and different monetisation channels
can be opened up.
19 macworld.com/article/3402057/swiftui-and-catalyst-apple-executes-its-
invisible-transition-strategy
20 developer.apple.com/ipad-apps-for-mac
74 iOS Development
watchOS
watchOS21 was presented together with the Apple Watch in
April 2015 and is an iOS derivative, especially tailored for this
device.
The user interaction patterns and the whole interface have
been adapted to the small screen, which does not allow things
like multi-finger interaction. This is the reason why Apple
has also equipped the watch with a digital crown and a side
button. The crown allows users to scroll and zoom within
applications. The side button serves as some kind of modified
home button known from the iPhone and iPad.
The heart of the interface is formed by the interactive dials.
Besides showing the time, they also display information or
interaction options desired by the user. These Complications
allow access to apps or display data.
Apple offers a variety of different dials. These range from
minimalist representations to analog clock interpretations.
The ecosystem allows users to install third-party apps.
However, until watchOS 5, those had been bundled together
with an iOS app for the iPhone. The reason for this, was that
parts of the logic were executed on the smartphone. The
iPhone also provided internet connectivity for the first genera-
tions of the watch. Since iOS 13, Apple allows stand-alone
Apple Watch apps. watchOS 6 introduced a separate App Store
for this purpose. This means that the Apple Watch can now be
considered a stand-alone, self-sufficient device.
21 developer.apple.com/watchos
75 iOS Development
Watch apps can be created using the development infra-
structure provided by Apple. A special simulator exists in
Xcode for this purpose. In addition, WatchKit22 is provided as
a framework.
Amongst other things, it gives access to sensors, sending
notifications and many other things. The iOS UI framework
UIKit is available on the watch as well.
Apple continues to evolve its smartwatch platform with
annual updates. The increasing self-sufficiency of the Apple
Watch and its focus on health, have generated a large market.
Apple does not announce any sales numbers but it is the most
popular watch and Apple even surpasses Rolex in this market
segment today23.
22 developer.apple.com/documentation/watchkit
23 businessinsider.de/apple-q2-2019-earnings-apple-watch-
airpods-sales-2019-4
76
Distribution, App Store & Monetisation
The distribution of iOS apps is done exclusively via Apple's App
Store. Users are currently spending approximately $120 billion
on iOS Apps per year24 . However, the gold rush mode of the
early days is over, due to a massive competition: There are over
2 million different apps currently available for iOS devices25.
Uploading apps to the App Store requires a membership
in the Apple Developer Program26. Two different models exist
here. The Apple Developer Program, facilitates the distribution
of apps in the iOS App Store to the general audience. With the
Enterprise Program, Apple also offers the ability to distribute
apps to a dedicated user base only. This is especially important
for those companies who want to provide tools for internal
usage, only for their employees.
Apple insists on the strict control of the content and func-
tionality of any app submitted to the Store. They are reviewing
all app submissions, in order to reduce the risk of providing
malware to their users. For you as a developer it means that
you should carefully read the App Store Review Guidelines27 to
avoid rejection. And be prepared to wait a little until your app
is available to your users, because the review process might
take some time. A delay of at least 24 hours needs to be taken
in account. Apple provides a separate process for emergencies
and serious bugs.
24 appannie.com/en/about/press/releases/app-annie-releases-annual-state-of-
mobile-2019-report
25 lifewire.com/how-many-apps-in-app-store-2000252
26 developer.apple.com/de/support/compare-memberships
27 developer.apple.com/app-store/review/guidelines
77 iOS Development
With the help of TestFlight28, apps and updates can be
tested before they are released. Up to 10,000 testers can be
invited who can use the application independently from the
App Store. However, Apple still reviews these test versions
prior to distribution.
The direct monetization of iOS apps is essentially based on
three different models: one-time purchase, in-app purchase
and subscriptions. To learn more about these options (and
other strategies), make sure to read the monetization chapter
in this book.
In recent years, Apple has increasingly started to rely on
the use of subscriptions. Here, users can subscribe to the app
or services within the app.
Apple retains 30% of sales as a fee for all these monetiza-
tion models. This drops to 15% for subscriptions lasting longer
than 12 months.
In September 2019, Apple launched a new, Netflix-like
monetization model especially for games. Apple Arcade29 offers
a monthly subscription that gives exclusive access to selected
games.
28 developer.apple.com/testflight
29 apple.com/apple-arcade
Learn More
The advantage of a mature platform like iOS, is its generous
documentation and body of source material. A number of
excellent websites exist on the Internet for learning iOS
development.
30 developer.apple.com/library/ios/documentation/UserExperience/Conceptual/
MobileHIG
79 iOS Development
— Merowing.info is a blog from developer/trainer/speaker
Krzysztof Zablocki who offers tutorials and insights into
iOS development from his experience as a consultant. He
also is active in the Open Source Community, creating
tools and libraries for iOS developers.
— AshFurrow.com is another popular iOS blogger/developer
who proudly states, that the purpose of his blog is
"Exploring the Pain Points of iOS." He has authored
multiple iOS Development books, is an active speaker and
is involved in the Open Source Community.
— This Week in Swift is a weekly newsletter involving the
most interesting Swift-related news, developments, tutori-
als and general tidbits related to iOS development.
80 iOS Development
Summary and Outlook
Since its initial release in 2007, iOS has changed and diversi-
fied in many ways. Originally established as a pure smartphone
operating system, iOS today runs on tablets, watches and
even TVs. Beyond that, the development shows that Apple
increasingly wants to establish iOS as a complete alternative
to desktop. Precisely, this is being reinforced by the idea of
iPadOS.
In addition, the focus on alternative interaction levels
is expanding. For example, investments are being made in
Siri and the integration of voice UIs in apps. Furthermore,
with ARKit, a focus on augmented reality applications can
be observed. This creates room for speculation about an iOS
derivative for AR glasses, new Apple devices and new markets
opening up. Last but not least, it is clear that Apple is increas-
ingly integrating machine learning directly on its devices.
CoreML allows developers to easily implement their own AI
solutions.
iOS is a vital, and active platform with a mature ecosystem.
Join the party.
81 iOS Development
Robert Virkus
Cross-Platform
Development
BY
With only Android and iOS as the main players, why should you
consider using a cross-platform development framework? In
this way even a small team can cater both platforms. And you
might even target other form-factors and media easily like PCs,
game consoles and websites.
83 Cross-Platform Development
Benefits and Drawbacks of Cross-
Platform Frameworks
With the differences above, why should you consider using a
cross-platform framework?
However:
84 Cross-Platform Development
Cross-Platform Strategies
This section outlines some of the strategies you can employ to
implement your apps on different platforms.
Direct Support
You can support several platforms by having a specialized team
for each and every target platform. While this can be resource-
intensive, it will most likely give you the best integration and
user experience on each system. An easy entry route is to start
with one platform and then progress to further platforms once
your application proves itself in the real world.
Component libraries can help you to speed up native
development, there are many commercial and open source
components available for all platforms.
Asset Sharing
When you maintain several teams for different platforms you
can still save a lot of effort when you share some application
constructs:
85 Cross-Platform Development
— Complete abstraction: Some cross-platform tools enable
you to completely abstract the business model, view and
control of your application for different platforms.
Cross-Language Compilation
Cross-language compilation enables coding in one language
that is then transformed into a different, platform-specific
language. In terms of performance, this is often the best
cross-platform solution, however, there might be performance
differences when compared to native apps. This can be the
case, for example, when certain programming constructs
cannot be translated from the source to the target language
optimally.
There are three common approaches to cross-language
compilation: direct source to source translation, indirectly
by translating the source code into an intermediate abstract
language and direct compilation into a platform’s binary
format. The indirect approach typically produces less readable
code. This is a potential issue when you would like to continue
the development on the target platform and use the translated
source code as a starting point.
86 Cross-Platform Development
(Hybrid) Web Apps
Hybrid web development means to embed a web view within
a native app. The standard for hybrid apps is the open source
tool Apache Cordova1 (formerly known as PhoneGap). This
approach allows you to access native functionality from within
the web parts of your apps and you can also use native code
for performance or user experience critical aspects of your app.
Hybrid apps allow you to reuse the web development parts
across your chosen platforms. Read the web chapter to learn
more about mobile web development.
ANSI C
While HTML and web programming starts from a very high ab-
straction you can choose the opposite route using ANSI C. You
can run ANSI C code on all important platforms like Android,
iOS and Windows. The main problem with this approach is that
you cannot access platform-specific APIs or even UI controls
from within ANSI C. Using C is mostly relevant for complex
algorithms such as audio encoders. The corresponding libraries
can then be used in each app project for a platform.
Popular Frameworks
Here are some popular frameworks that are used to develop
cross-platform apps in no particular order.
Xamarin
Xamarin2 supports both mobile and desktop systems and par-
ticularly addresses Windows developer due to its C# and XAML
UI support. Traditionally, the UI was created using native
1 cordova.apache.org
2 xamarin.com
87 Cross-Platform Development
components, but now generic cross-platform UI components
are also supported. Native libraries can be easily integrated.
Cordova
Cordova3 formerly known as PhoneGap provides an HTML/JS
approach that makes it very easy for web developers to create
mobile apps. The UI is rendered by the browser elements,
so you will have a full web experience. Native code can be
integrated using a plugin approach.
Flutter
Flutter4 is a relatively new framework that renders its own UI
completely independent of the OS native UI. Next to mobile
platforms, it also supports desktops and the web. Native code
can be integrated using a Flutter's channel concept.
React Native
With React Native5 you code in JS while the UI consists of
native elements, ensuring a full native experience. Native code
can be integrated using plugins.
3 cordova.apache.org
4 flutter.dev
5 facebook.github.io/react-native
88 Cross-Platform Development
various platforms, your marketing budget and the know-how of
your development team into account.
89 Cross-Platform Development
Ruadhan O'Donoghue
Mobile Web
While the theme of this book is largely app-oriented, it
would not be complete without talking about the mobile
BY
web. Indeed the line between apps and web is often blurred
in an ecosystem where apps can be built entirely with web
technologies, can pull their data and content in via web API
requests, or can act as simple app shells for what is essentially
a browser (WebView). It can be useful to think of a web-native
continuum, with native at one end and web at the other, and
various hybrid models in between.
The mobile web and native apps are often pitted against
each other as competitors. In many ways they are; often either
approach would be suitable to solve a particular problem. It is
easy, however, to get lost in the arguments; there are emphatic
and obsessive proponents on both sides.
But while apps and web are competing platforms, it is also
true that they are complementary platforms, each with its
own set of strengths and weaknesses. We will not dwell on the
app versus web argument here. Rather we will view them as
complementary technologies which often overlap.
That said, with modern web features such as Device APIs,
push notifications, installable apps, 60 fps animations,
discoverability, the mobile web is a platform both capable and
formidable.
91 Mobile Web
Mobile Web Usage
The world has already reached the tipping point where more
time is spent on mobile than desktop. And while users spend
far more time in apps than on the mobile web, it can be
misleading to think that is the whole story. The mobile web
has a far larger audience than native apps.
+45% +82%
vs. 2014 vs. 2014
12,000
10,000
8,000
6,000
Apps
2,000
92 Mobile Web
Devices, Browsers and Fragmentation
The web today is mostly experienced through a browser
running on a desktop computer or mobile device. This is where
things can get tricky for mobile developers: if you come from
a desktop web development background and thought that
developing and testing for all the various desktop browsers was
hard, then you had better sit down; things are considerably
more complex on mobile.
There are at least as many mobile browsers as there are
on desktop. But on mobile, in addition to the browser on
the device, we also have to consider the type of device and
its properties and capabilities. The types of properties and
capabilities that can impact web development include
93 Mobile Web
What is a Web Browser Anyway?
The web browser is a central part of the web platform. It is a
complex piece of software with many roles. It orchestrates the
underlying web technologies, combining them into usable web
pages. It acts as a window and interface to the web for the
user, interpreting the user's actions and inputs, and rendering
its response in real-time.
On top of all of this, the major browsers come bundled with
a set of complex developer tools, that provide deep insights
into the inner workings, structure and performance of the web
pages that it renders. There are many developer tool features
that help specifically with mobile development. We will see
more about developer tools later in the Testing section.
When you build a web page, you are building something to
be consumed by browsers, and so you must be aware of their
capabilities, idiosyncrasies, and limits, especially on mobile.
94 Mobile Web
— Gecko: an open source engine used in Mozilla's Firefox
browser
— WebKit: a widely used engine that powers Safari, as well
as all browsers in the iOS App Store, and formerly Google's
Chrome. It was built by Apple in 2001 and open-sourced
in 2005
— Blink: in 2013 Google forked WebKit—which it had been
using in Chrome—to create Blink. Blink now powers
Chrome, Opera, Microsoft's Edge browser, and all Chromium
based browsers
— Presto: (retired) formerly used in Opera (now powered by
Blink), and is still used in Opera Mini
— EdgeHTML: (retired) formerly used in Microsoft's Edge
browser (now powered by Blink)
— Trident: (retired) formerly used in Microsoft's now retired
Internet Explorer browser
95 Mobile Web
What Browsers Should You Develop For?
One constant of the web is the ever-changing browser land-
scape. Browser popularity will vary from market to market and
location to location. You should have an idea of the browser
market share in your target market, so that you can prioritize
and optimize for these browsers. This said however, you should
also try to maximize browser compatibility across the widest
range of browsers where possible, since, except for in very
limited or constrained circumstances, you will not know in
advance what browser or device a user will use.
Chrome 57,14%
Safari 19,92%
UC Browser 8,71%
Opera 3,84%
Android 1,58%
Other 2,57%
Source: gs.statcounter.com/browser-market-share/mobile/
worldwide/#monthly-201806-201906-bar
Reports such as DeviceAtlas' Mobile Web Intelligence Report1
provide periodic snapshots of the device and browser landscape,
highlighting interesting market share data such as the most
popular OSes, manufacturers, and screen-sizes, and can help
guide decisions relating to browsers and browser targeting.
1 deviceatlas.com/blog/the-most-popular-mobile-browsers
96 Mobile Web
HTML, CSS, and JavaScript: the Building
Blocks of the Web
So far we have only covered devices and browsers. Now let us
look at the technologies that are used to render web pages for
us: HTML, CSS, and JavaScript.
97 Mobile Web
CSS preprocessors such as LESS and SASS are often used to
extend CSS with operators and functions and other features
that improve the development process and promote code reuse
and maintainability.
CSS3 is well supported across mobile browsers.
Advantages
Progressive Enhancement
Progressive enhancement is a technique that has been around
since 20032 . The idea is that you start off with a minimal,
base page sent to every device, along with some JavaSript
enhancement logic. A low-end device might ignore or fail to
execute the enhancements, but will still deliver a functional
experience for the user. More capable smartphones, tablets and
desktop browsers will execute the JavaScript enhancements
progressively until the page is built up to an optimal level for
the device.
This approach stands in contrast to the idea of grace-
ful degradation, where rich functionality is built first, and
exceptions are added afterwards. This requires additional work
to ensure that a page is still functional in the absence of any
unsupported features.
In practice, you should consider progressive enhancement
as a technique that can be used to smooth over differences in
a range of mobile devices, rather than as an overall approach.
2 hesketh.com/publications/inclusive_web_design_for_the_future
Disadvantages
Advantages
Disadvantages
Advantages
3 There are various definitions of adaptive web design; here we mean that
there are some device optimizations taking place on the server.
4 deviceatlas.com
5 scientiamobile.com
104
Disadvantages
Advantages
Disadvantages
6 cordova.apache.org
7 phonegap.com
8 reactnative.com
9 flutter.dev
Advantages
Disadvantages
107
Progressive Web Apps
Progressive Web App (PWA) is a term used to describe web
apps that make use of modern browser features to deliver rich
app-like experiences. The term was first coined by Alex Rus-
sell10 in 2015 to describe web apps that exhibit the following
criteria:
11 ampproject.org
AMP as PWA
In this pattern, the AMP page is the PWA. It uses the AMP
library, so that a valid AMP page can be served from the
AMP Cache, resulting in lightning-fast pages. When links are
followed however, the user is brought to the original server,
where a service worker can now be used.
12 google.github.io/physical-web
13 mobiforge.com/design-development/googles-beacon-platform-and-the-
physical-web
14 webperformancetoday.com/2014/04/09/web-page-speed-affect-conversions-
infographic
15 blog.gigaspaces.com/amazon-found-every-100ms-of-latency-cost-them-1-in-
sales
16 doubleclickbygoogle.com/articles/mobile-speed-matters
Source: blogs.akamai.com/2017/04/new-findings-the-state-
of-online-retail-performance-spring-2017.html
Performance Goals
The idea of a performance budget has been around for a few
years; during planning, a "budget" is set on different aspects
of how a page should perform, and you try to stick to this
budget during development. The specific dimensions of a
performance budget might include restrictions on page weight,
number of HTTP requests, page load time, time to initial
interactivity and so on. If you cannot meet the budget, then
you need to consider the assets or features that are blowing
the budget. Do you really need that fancy image carousel of
JavaScript library for instance?
17 developers.google.com/web/fundamentals/performance/rail
115
Analytics
Analytics is vital to understanding your visitors and traffic. It
can be particularly useful on mobile to help you understand
what devices your users are using. For many, however, analytics
starts and stops with installing a Google Analytics script. But
Google Analytics is not the only show in town.
Analytics tools can collect their data on the client or on
the server. It is worth noting that relying solely on JavaScript
based analytics can be problematic, especially on mobile. If a
device fails to run the analytics script—for example, if it is an
older device—then you will have no visibility of this device
at all, and it can lead you to focus on the wrong devices.
Additionally, many ad blockers also block client-side analytics
such as Google Analytics. If you are more serious about your
analytics, a more accurate picture of your data can be gained
by employing a combination of both client and server-side
analytics.
Popular tools include Google Analytics18, KISSMetrics19, and
Matomo20. Some tools, such as wao.io21 provide both server
and client side analytics.
18 analytics.google.com
19 kissmetrics.com
20 matomo.org
21 wao.io
117
Monetization
Ads
Ads have traditionally been one of the most common ways to
monetize a website, and no less so on the mobile web. There
are plenty of ad networks to choose from.
Ad blockers
If you choose an ad-based monetization model, note that
there has been a growing backlash against ads—particularly
on mobile—since Apple added support for ad-blockers into
Mobile Safari in 2015. Ads have a bad reputation for adding
unnecessary page bloat and degrading web performance.
Mobile and desktop browsers are increasingly shipping with
built-in ad blockers and enhanced privacy protection. Even
Google, a company whose main revenue stream is based
on ads, has included an ad-blocker in its Chrome browser.
Therefore, if you are relying on ad revenue, be sure to know
the risks and potential downsides.
UX
Remote Debugging
All of the major mobile platforms support remote debugging
of mobile devices. Remote debugging allows you to attach a
mobile device to a desktop machine and apply the developer
tools of that machine's browser to test and profile the web
pages on the mobile device.
Remote debugging is an extremely useful tool, since it
allows you to test on real devices, and on real networks. Of
course, you still need devices to test with, and that can get
expensive. At the very least, you should be looking at having a
low-end and high-end device on each of the main mobile OSes:
Android, iOS, and Windows. Even then, there will be major gaps
in your testing coverage; this is where device labs can help.
Selenium WebDriver
Selenium WebDriver24 is the leader in automated web testing.
Automated testing is very useful for quickly finding issues
with user interfaces, and can be used for regression testing to
quickly find breaking interface changes.
Selenium additionally supports mobile testing25on Android
and iOS, and both simulator and real device testing are
supported.
Webpage Test
WebPagetest26 is an open source and free-to-use performance
testing tool which offers remote testing on real desktop and
mobile browsers at different locations around the world. It
provides waterfall performance charts, as well as measurement
of key performance metrics such as time to first byte, speed
index, and a number of DOM elements.
mobiReady
MobiReady27 is a free tool for developers, designers, and
marketers that tests web pages and sites for mobile-readiness
based on mobile web best practices and standards. It returns
a detailed analysis for a page, and offers recommendations on
how to address any detected issues. It also includes:
24 seleniumhq.org/projects/webdriver
25 github.com/SeleniumHQ/selenium/wiki/WebDriver-For-Mobile-Browsers
26 webpagetest.org
27 mobiready.com
Lighthouse
Lighthouse28 audits a web app for PWA features, including:
PageSpeed Insights
PageSpeed Insights29 is a tool from Google that measures page
performance for mobile and desktop visitors. It checks for com-
mon performance best practices, and ranks pages out of 100.
When issues are detected, it offers advice on how to fix them.
28 developers.google.com/web/tools/lighthouse/
29 developers.google.com/speed/pagespeed/insights
BrowserStack
BrowserStack31 offers remote testing on a variety of desktop
and mobile browsers, and different operating systems. The
mobile devices have been chosen for "maximum market cover-
30 aws.amazon.com/device-farm
31 browserstack.com
Perfecto Mobile
Perfecto Mobile34 offers paid-for remote testing on real
devices. Supports manual and automated testing on multiple
devices. A free trial is also available.
32 developer.samsung.com/rtlLanding.do
33 appexperience.sigos.com
34 perfectomobile.com
Resources
35 opendevicelab.com
36 available via shop.oreilly.com/product/0636920035060.do
Mobile Gaming
BY
1 newzoo.com/key-numbers newzoo.com/key-numbers
2 appannie.com/en/insights/market-data/q2-2019-mobile-games-market-index
3 mrbossdesign.blogspot.co.uk/2008/09/triangle-of-weirdness.html
4 scienceandvalues.wordpress.com/2010/02/26/csikszentmihalyis-flow-
pleasure-and-creativity
5 gamesindustry.biz/articles/2014-10-14-mobile-spending-driven-by-35-44-
year-olds
1. Discovery
Players have a particular set of needs and aspirations when
they first encounter your game and there is really very little
beyond the icon and the first sentence of your app store listing
to motivate players to download and play the game the first
time. Despite that setting the right expectations is essential. If
the game charges upfront, let the player know why they should
still buy it, and what they will miss out on if they do not. If
the game is free we still have to create expectations, but we
also have to show the player why the advertising is worth the
hassle or if there are in-app purchases, why those players will
feel good about buying them. This is a delicate art.
2. Learning
Once they have taken the choice to install your game we have
to make it as easy as possible to engage. Make the icon and
name of the game instantly recognizable and ideally a tease, a
reason to kick off the app. At this stage we do not want them
3. Engaging
If we succeed and set up the right expectations to keep
them playing we really start the process of building long
term engagement. At this point the player understands the
challenge and progression and is already returning to continue
to play for subsequent sessions. At this stage they should
also understand the value of investing further time or money
into the game. It is much easier to sell IAP and leverage the
use of Opt-In Ads to players who already get the benefits of
the game. Sustaining this over the longer term however is
challenging. We need longer term 'achievable' goals as well as
events and social engagement if we are to keep players, and
we have to do all this without over-complicating the game.
3.2. Re-engagement
Players who have become engaged will still have a lifecycle;
but it may become possible to re-engage them when you add a
new update, new content or even events inside the game.
4. Churning
The final lifestage we have to acknowledge is “Churning”. It is
inevitable that in the end players will stop playing our game.
We want to delay that as long as possible, but to fail to plan
for that is going to cause us more problems.
138
Analytics and Game Flow
Making a game is a little like designing an experiment;
especially in this data rich, connected era of lean development
and minimum viable products. We make a hypothesis and test
it as simply as possible. We want to know as fast as possible
if we are on to something or not, ideally before spending a lot
of money on unnecessary development. That means we need
analytics to help us understand what is going on at every life
stage.
First, we do not have to capture everything. There are
some kinds of data which are static, reference information.
For example, the specific position in a specific map. As long
as the version of the map used at that time is known then
X,Y,Z coordinates alone can be used to create a heat map later.
We can also infer a lot of data from other events as long as
there is some connecting information. For example, we do
not need to capture the level that the player is using for that
game in every event or even a list of all the players in that
session. We can capture that information with a specific ‘Start
Session’ events and use the associated session ID to allow us
to identify everything that happened in that specific game
session. Most commercial analytic platforms will automatically
capture common data sets like date/time, X,Y,Z etc into their
event collection process.
We also have to understand that the data we collect will
always be incomplete. For example if the battery dies or the
player switches to a phone call – we will probably not get the
last upload.
We have a duty to treat player data very carefully, we need
to make sure that players remain anonymous. We do not want
or need to spy on our players but we do need to understand
how the game plays across all players without falling foul of
— GameMenuLaunch
AnonPlayerID; TimeIconLaunched
— SessionLaunch
TimeSessionLaunched; AnonPlayerID(s); SessionID;
LevelIDSelected; OptionSelected
— SessionStart
TimeSessionStarted; AnonPlayerID; SessionID;
— ObjectiveSet
TimeObjectiveSet; AnonPlayerID; SessionID; ObjectiveID;
6 develop-online.net/opinions/navigating-the-hazards-of-game-data/0187815:
In essence the point is that we are looking for the ‘Hazards’ in the flow of
the player experience such as whether they churn (i.e. leave the game) but
also trigger points for more positive action such as paying for an IAP or
watching a video ad.
— TargetHit
TimeTargetHit; AttackerID(AnonPlayerID?); SessionID;
TargetID(AnonPlayerID?); Damage, XYZLocation
— PlayerDeath
TimePlayerDeath; AnonPlayerID; SessionID; XYZLocation
— LevelComplete
AnonPlayerID; SessionID; ObjectiveID; Score; Reward;
XYZLocation
Rule 1: Utility
Everything starts with utility, an economics term in this case
used to express the 'expectation of value' for the player. In
Free2Play players are usually not buying the 'gems' or what
ever currency you might be using because they are so shiny.
Buyers are driven by the expectation of what gameplay these
items will unlock. The same principle applies even if you are
charging for access to the game. It is not the physical delivery
or the download size that players value but the anticipation of
the game.
Rule 2: Anticipation
An essential element of monetization design is how we com-
municate the Utility we are creating to the player. There are
generally four forces preventing a player making a purchase:
Uncertainty of outcome, Social issues, Opportunity costs and
External needs.
A hard lesson from this is that we cannot make people pay;
and although it might be possible to manipulate people in
the short term that is not sustainable, counterproductive and
damages trust for everyone. Instead, we need to create the
conditions where people can give themselves permission to
play. This means we need to create the following four factors:
Expectation of delight, Social capital, Call to action and
Abnegation of other priorities.
Rule 3: Scarcity
Just like in the real-life economy, scarcity is also a vital aspect
of the economy of your game. However, when creating scarcity,
do not forget about rule1: Utility. Any use of scarcity has to
be authentic and focus on the enjoyment of the game. Adding
opt-in video ads or IAP must be an extension of our overall
148
Rule 4: Timing
Players needs are not static. This is especially important in
free2play games but also affects players willingness to make
DLC purchases in premium games. As developers we have
to think about the player lifecycle and how that impacts
players willingness and interest in making purchases. It is
also important that the game feels alive through community
engagement, events and regular predictable updates.
INTEREST
ANTICIPATION NEEDED
TO PURCHASE
TRUE
ENGAGEMENT
MAXIMIZING
UTILITY
BUYER
REMORSE
TIME
initial interest
Rule 5: Repetition
Repetitive actions can become intrinsically rewarding and
this can also help build positive habits as well as building
trust with your players that they can obtain the Utility they
anticipate from your game. Highly repeatable game mechanics
are essential to monetization success, especially on mobile
where we can play repeatedly throughout the day.
This is reflected in the rapid increase in the willingness
of player to spend more the longer they have engaged with a
game.
In 2014 Unity Ads did a survey with 3000 online partici-
pants which showed a clear correlation between longer play
time and increase revenue. This was not just linear either.
1. Define the objective Ask why you want this data and set
clear objectives on what you expect the data to tell you
2. Identify what you can measure Identify what data points
will help us answer the questions laid out in our objectives
3. Identify player decision points Identify the trigger
actions in the game which indicate player decisions
4. Define common events What do not we have to specifi-
cally collect and which data point allow us to compare
events across the game e.g. AnonPlayerID; SessionID/etc
5. Identify reference data I.e. What do not we have to
specifically collect because these data points do not
change during a player session (i.e. we need not repeat-
edly capture them)
6. Select your analytics platform Do you make you own or
use an external provider such as Unity Analytics
7. Segment your data Create custom cohorts so you can
compare different parts of your audience or different
builds of your game, etc.
8. Create funnels, heat maps, define KPIs as required to
track your games performance
9. Continue to iterate and test your reporting process as
well as your game
Rule 7: Scale
The most troublesome rule; and perhaps the one rule to rule
them all. Scale matters. We need an enormous volume of play-
ers watching a significant number of ads per day in order to
generate measurable revenues just on ads. Typically 30%-50%
Getting Discovered
If you have followed these guidelines then you will have
already put your game design into the best form that suits
your audience and that itself will (hopefully) give you a fight-
ing chance. However, that alone is not enough. We have to use
every possible communication route we can and that usually
requires investment. It is still possible to succeed without
spending money on advertising, but you have to be the winner
of a global lottery ticket. This applies on mobile games as on
any other kind of mobile app as well. Hints how to market your
software can be found in the monetization and in the ASO
chapter. Additionally, here are strategies which you might want
to think about especially for games.
Advertising
Spending money on advertising can help, but it is important to
realize that you are competing with a lot of people and some
big players who are seeking large audiences. It is important
to remember what you are trying to achieve when creating
an advert. There are two motivations, building awareness
and direct action (i.e. downloading the game). In games we
are able to put adverts in other games and apps on the same
device we want the players to experience the game. There is
nothing getting in the way between the advert and the app
store. One click and you can buy/download the game. That is
an amazing thing, no other media has that kind of frictionless
experience.
Another peculiarity to be aware of is that the larger
the reach (range of players) you are looking for, the more
expensive each of the installs. This is because buying space
on an advertising network is based on a bidding process and
the results will be calculated on the basis of Cost Per Install,
Cost Per Mille (i.e. per thousand) or a blend of the two
known as eCPM (effective CPM) as well as ad networks like
Chartboost.com or AppFlood.com which offer cross promotion.
7 pocketgamer.biz/events
8 indieprize.org
In Game Events
Regular events and outreach to the community allow us to
sustain and to grow our audience. Building on genuine social
experiences, such as the recording of gameplay videos and
sharing of community data (high scores etc) players can help
reach out to their friends and other potential players via
Facebook, Twitter, Everyplay and YouTube.
Influencer Marketing
In recent years Influencer marketing has become increasingly
professionalized and working with YouTube personalities con-
tinues to have a significant impact on the take up of games,
including mobile. Increasingly, even moderately successful in-
fluencers will have agents who not only protect their interests
but also help developers match up to the best people for their
game brand. It remains vital, even in the game design process
to consider how your player will look good to their audience
whilst playing your game. Not ever player is a YouTuber but
thinking about the visual impact of the experience in this way
will make it easier to not only entertain your players but also
to build up awareness for your game brand. Any engagement
with a Youtuber needs to be done carefully as poor behavior
9 unityads.unity3d.com
eSports
In 2018 sports captured the attention of nearly 400 million
viewers worldwide — and cable and OTT platforms took note,
with media rights revenues topping $180 million.
Total esports revenues reached $869 million in 2018, and is
forecast to more than triple by 2022, reaching $2.96 billion,
according to an October 2018 report by Goldman Sachs.
The level of talent and professionalism in the eSports
market is now significant and game developers are starting
to consider how this will impact game design. However it is
still the case that there are very few mobile games which can
legitimately claim to have gained a strong enough following.
In Summary
In the end despite all the differences in the details, mobile
is like any other platform. We have to acquire, retain and
monetize our audience. That only happens if we entertain play-
ers in the way that works for their devices. Devices which are
perhaps the most social and most pervasive devices in human
history. Mobile gaming is thriving despite the hurdles and the
lessons learned will affect every aspect of game development.
Threat Modeling
The starting point for secure IT designs is to create a threat
model. A threat model begins with listing all the assets of
concern to your product. Assets include all the software
components, hardware, data schemas and data stores, APIs,
microservices, interfaces, and communication channels needed
to make your product work. Then create a model of threats for
each of these assets. There are multiple threat models available
that help with the analysis.
The OWASP Mobile Top 101 list identified the dominant
threats to mobile platforms: improper platform usage, insecure
data storage, insecure communications, insecure authentica-
tion, insufficient cryptography, insecure authorization, client
code quality, code tampering, reverse engineering and
extraneous functionality. OWASP provides extensive supplemen-
tary materials on the nature of the threats, and how to code
securely against them, and test the applications.
The Cloud Security Alliance (CSA)2 is focused on threats
related to cloud services, and provides training and tools for
assessing threats to cloud computing. CSA offers a free Cloud
1 owasp.org/index.php/Mobile_Top_10_2016-Top_10
2 cloudsecurityalliance.org
Spoofing
Spoofing attacks have two basic types. The identity of a user
might be spoofed by a hacker, pretending to be someone he is
not. This is where strong authentication comes into play, to be
sure that users of your app are who they actually claim to be.
Users may also be victims of spoofed services. The classic
phishing attack is where you receive a spoofed message (SMS,
email, voice call) asking you to log into your bank account at
the given URL. Often the message indicates a sense of urgency.
But the URL is not for your expected bank, but a link to a
web site that looks just like the bank. The hackers are hoping
someone will enter their username and password there, then
they can use those credentials to log into the real bank and
transfer money out.
While you cannot stop hackers from sending spoofed mes-
sages to your customers, you can have a policy of not contact-
ing your customers to ask them to log in. Tell your customers
that you will never call them asking for their password, or send
3 en.wikipedia.org/wiki/STRIDE_(security)
Tampering
Tampering attacks may be directed against software, data,
databases, files, and communications networks. Tampering of
software packages is prevented by digitally signing packages
(like iOS IPA and Android APK files). But once installed on
mobile devices, hackers with rooted/jailbroken phones can
manipulate the software and data at will. They can replace
libraries with hacked libraries, change the contents of memory
at run time, patch the binary, and otherwise subvert the
application for their own benefit.
Hence your design must not trust the user’s device.
Countermeasures include: do not store secrets (passwords, API
keys, sensitive data) in your IPA or APK files, as hackers have
full access to all the information therein. Inspect the Android
Manifest file in APKs, and the Info.plist file in IPA files to
be sure no secrets are there. Generally any kind of sensitive
computation, like user identification, authentication and
authorization, or a proprietary algorithm, should be performed
server-side to keep those functions out of view of hackers.
Sensitive data should not be stored on the mobile device if
possible, otherwise use an encrypted storage mechanism, like
the keychain available for iOS and Android. Tampering of data
in storage can be detected using secure cryptographic hashes
and digital signatures.
Repudiation
Repudiation is countered by secure logging of user identifica-
tion and users’ actions, which in turn requires solid user
identification, authentication and authorization functions. Use
of 2-factor authentication is increasingly common, and this
helps to control access to applications.
Many applications and services use the mobile device as
a second factor for authentication. The service sends an SMS
message to the phone containing, for example, a one-time
6-digit token, and the user enters that token in the application
to confirm the user’s identity. But in the mobile app space, if
your phone has been stolen, and a hacker knows your password
to get into a mobile app, having an SMS message sent to the
stolen phone provides no additional protection at all. And of
course, social engineering hackers are focusing on that second
factor as well.
Denial of Service
Denial of Service attacks are usually seen on the server-side.
Botnets are a continuing problem, as they attack servers,
and deny access by legitimate mobile apps. One strategy for
reducing the risk of DOS attacks is to use a commercial cloud
service. Cloud services all have DOS protection built into their
infrastructure, so that you can focus more on the business
functionality of your applications.
Escalation of Privilege
Escalation of Privilege may happen in the model context where
network traffic may be hacked, and privilege level of a user
may be elevated, to access data the user should not see. This
is more of an API hack than a mobile app hack per se. But the
risk is still there. You counter the risk of Escalation of Privilege
Security Testing
Once you have built your application, and completed all the
functional testing you can5, it is time to perform a security
test. In the mobile app arena, you can hand off the binary file
(IPA or APK) to a separate security test team, or do the testing
yourself.
Here is a checklist of security tests you can run your app
against. This is by no means comprehensive, but gives you an
idea of the scope of issues to examine once you build an app
and are ready to test it for security:
4 owasp.org/index.php/Category:OWASP_Top_Ten_Project
6 checkmarx.com
7 microfocus.com/en-us/products/static-code-analysis-sast
8 hcltechsw.com/wps/portal/products/appscan
9 microfocus.com/en-us/products/webinspect-dynamic-analysis-dast
10 guardsquare.com/en/products/proguard
11 wireshark.org
12 sourceforge.net/projects/paros
13 charlesproxy.com
14 ietf.org/blog/tls13
15 ssllabs.com/ssltest
the TLS certificate is not expired, has a trusted certificate
chain, will flag and identify known security exploits, show
which cipher suites are secure and which are weak, and
compare the domain name against the common name on
the certificate. Use this to test all the HTTPS domains
that your app uses, especially ones related to 3rd-party
software packages -- like services for ads, metrics, social
media, maps, etc. On iOS apps, use the App Transport
Security settings to force the use of HTTPS if possible.
9. Protocol security – make certain that login and logout
protocols work correctly and cannot be bypassed. Logout
functions need to send transactions to the server to close
any secure sessions – do not just revert to the login page
of the app. Check that password reset functions cannot be
spoofed easily. Set a password policy that requires complex
passwords.
10. Privacy – make certain you know what data is being
collected about your users. Minimize that data to reduce
risk. Do you provide the user with a privacy notice? Did
you build in “forget me” capabilities to meet GDPR privacy
requirements?
Meeting Privacy Requirements
Most of the above are focused on locking down your applica-
tion, so that information does not leak, via passive surveil-
lance or active intrusion. But current privacy regulations,
like GDPR, requires the ability “to be forgotten”, to securely
destroy a user's data in the system, secure the right of a
user to access his own data, and to be notified promptly of a
breach. And this must all be “watertight”. Most products are
designed to collect information, and usually do not have a
secure way to remove data from the system, short of relying
on a database admin and support ticket to try and remove
someone’s data. The penalties for non-compliance can be
staggering, the reach is global - anywhere the data of an EU
citizen is being processed GDPR applies. Consent has to be
explained in clear and plain language, and must be as easy to
withdraw consent as to give it. So mobile apps not only need
to be technically excellent from a security perspective, but
they also need to implement effective data management tools
– server and/or mobile side – to comply with GDPR the sun
within a solar system of privacy laws and regulations.
The State of California has its own privacy rules, the
California Consumer Privacy Act16, that takes effect on January
1, 2020. Other U.S. states are considering their own privacy
laws. Make sure you stay on top of them.
16 en.wikipedia.org/wiki/California_Consumer_Privacy_Act
17 developer.apple.com/library/mac/navigation/#section=Topics&topic=Security
18 lancelotinstitute.com
19 ssllabs.com/ssltest
20 owasp.org
21 owasp.org/index.php/OWASP_Mobile_Security_Project
Accessibility
BY
1 who.int/mediacentre/factsheets/fs352/en
2 webaim.org/projects/screenreadersurvey6/
173 Accessibility
technology in their everyday life3. This demonstrates just how
important accessibility is to enabling independence.
There are lots of other reasons to make your apps acces-
sible:
3 apple.com/accessibility/stories
174 Accessibility
— The organization that the app is being developed for may
have a corporate social responsibility (CSR) statement or
program: For example, web and app accessibility provides
social inclusion for people with disabilities which is a
primary aspect of corporate social responsibility.
— Mobile platforms from Apple, Google and Microsoft
leverage their accessibility APIs for UI automation testing:
Making your app accessible can make automated testing
easier.
175 Accessibility
— Partially sighted users - Someone who is partially
sighted, benefits from being able to change the font
size, font style, colors and use of bold and color contrast
too. iOS, Android and Windows offer various options to
change these in the settings. As well as the universal
'pinch to zoom' feature, iOS, Android and Windows offer a
magnification or zoom feature, which enlarges a section of
the screen and keeps this magnification level when moving
throughout the phone or tablet. This has unique gestures
associated with it and often each OS has its own unique
gestures. iOS also has a built-in app that utilizes the
camera on the phone to aid with spot reading on items
such as clothing labels and restaurant menus.
— Blind users - Someone who is blind has to have informa-
tion on the screen and navigation around the screen
announced to them in synthetic speech. This is often
called a 'screen reader'. iOS was the first OS to offer a
screen reader built-in and it is called 'VoiceOver'. Android
offers 'Talkback' which is fast catching up in popularity
with the blind community as it is constantly improving.
Windows first delivered the Narrator screen reader in
Windows Phone 8.1 and it is even more improved now in
Windows 10 Creators Update. Blind users may also make
use of a Braille display, which is an item of hardware
that provides feedback from the screen one text line at
a time in the form of a line of Braille characters. Each
Braille character consists of six or eight movable pins in
a rectangular array. Most OS versions now support braille
displays via Bluetooth.
— Users with hearing loss - Someone with a hearing impair-
ment will often make use of a smartphone that is hearing
aid compatible and offers features as iOS does such as
'LED Flash for Alerts' or 'Phone Noise Cancellation'. There
176 Accessibility
are also options in settings for iOS, Android and Windows
to switch on subtitles and captioning. Making use of
vibration for alerts is also helpful and haptic feedback has
improved in recent versions of iOS in particular. A number
of phones also provide support for hearing aids and
teletype (TTY) devices4 .
— Users with physical disabilities - If a user has a motor
impairment, they may well be using a third-party hardware
product to access the phone, such as a switch as some
devices do support this. Alternatively, they could be
making use of voice recognition to access the device. Siri
in iOS enables the user to access certain settings and
functions and switch them on and off.
— Users with a learning disability - If a user has a cogni-
tive impairment or learning difficulty, then depending on
what the disability is, they may make use of the features
in the settings that a partially sighted user does. Espe-
cially something like color options. Other users may make
more use of voice recognition.
4 A TTY device allows people who have hearing loss or who are speech
impaired to type messages to anyone else who has a TTY, using a telephone
line.
177 Accessibility
example, a screen reader user can navigate a screen using left
and right swipes or exploring the screen by moving their finger
across the screen of the device in a consistent movement
(explore by touch). As they undertake a swipe or encounter
something underneath their finger, the item is announced. So
an item is selected by touching once (which moves the focus
to the icon) and opened by tapping twice. When using screen
magnification, depending on the OS, the user may need to
use a three-finger gesture. Including testing early on with
accessibility features ensures that these gestures are supported
by the app and that any redesign can happen before it impacts
on users.
One of the best ways to learn more about these features is
to switch them on and try them for yourself in different apps.
App Design Guidelines
The accessibility APIs look for text in specific attributes of
standard UI elements. Screen readers used by blind people,
such as VoiceOver and TalkBack, transform the text into
synthetic speech which the user listens to. The screen reader
software may also determine the type of control and related
attributes to help provide the user with more contextual infor-
mation, particularly if no text is available. It is important that
the user understands what the label of the control is, what the
control is and how to interact with it. In some instances, there
may also be a tooltip to give extra information.
Just as web developers make use of standards and guide-
lines such as WCAG 2.0 to make accessible websites, it is
important that as app developers, you do the same. At present,
there is no de facto industry standard for app accessibility,
although there are standards out there that can help.
The international standard, ISO 9241-171 ('The Ergonom-
ics of Human-system Interaction: Guidance on Software
Accessibility')5 is a helpful standard as it is platform agnostic.
This covers elements of accessibility and usability for a wide
range of software.
The Royal National Institute of Blind People (RNIB)6 have
created a pan-disability app standard and testing process
based on their experience in this area of accessibility. Their
guidelines for native apps also reflects on principles from ISO
9241-171. They provide consultancy and training for organiza-
tions and agencies in this area and have an accreditation
badge that can be awarded to apps that, following an audit
5 iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.
htm?csnumber=39080
6 rnib-business.org.uk
179 Accessibility
process and user testing, are accessible. This accreditation is
called 'RNIB Tried and Tested'7.
The BBC has developed a set of BBC Mobile Accessibility
Guidelines8 that they use internally for their mobile content.
Their guidance covers mobile websites, hybrid and native
apps. They state that "they are intended as a standard for BBC
employees and suppliers to follow however they can also be
referenced by anyone involved in mobile development".
Here are some of the principles that are helpful to be aware
of when developing an app. If you stick to them, you will also
give your app the best chance of interoperating with assistive
technology that the user may be running in conjunction with
your software:
180 Accessibility
— Follow the standard UI guidelines on your platform. This
enhances consistency and may mean a more accessible
design by default.
— The user should be able to apply their preference settings
that the OS provides, such as accessibility settings.
Navigation
User elements
181 Accessibility
— Where a user element has a status associated with it, that
status should also be available to be read by assistive
technology. For example if a toggle button is ‘on’ this
should be announced by the screen reader. If the status
changes, that should also be announced.
— Ensure touch screen targets are a reasonable size to ensure
everyone can easily select them.
Labeling
182 Accessibility
Colors and Fonts
183 Accessibility
Notifications
Testing
184 Accessibility
Apple, Google and Microsoft, have increased the importance
of their respective Accessibility support by using the Ac-
cessibility interface to underpin their GUI test automation
frameworks. This provides another incentive for developers to
consider designing their apps to be more accessible.
Looking at the different mobile platforms more closely, it
becomes obvious that they differ largely regarding their APIs,
but they are starting to implement a lot of the same acces-
sibility features.
9 youtube.com/watch?v=h5rRNXzy1xo
10 youtube.com/watch?v=2qjgxH384Nc
11 youtube.com/watch?v=euEsfNR5Zw4
12 youtube.com/watch?v=ld7kZRpMGb8
13 developer.apple.com/wwdc/videos
185 Accessibility
Android App Accessibility
Accessibility was first a realistic proposition with Android
4.1 (Jellybean) and it is much improved since then. Since
Android 7 (Nougat), there has been more prominent featuring
of accessibility settings to let users independently configure
their device. 'Display size' was added as an option and it gives
the user an alternative view of the standard screen, making
the icons and text larger as a native setting without any
magnification or font adjustment. This is also available as a
live preview.
Android 8 (Oreo) further enhanced accessibility by adding
the possibility to control accessibility volume independently
from media volume. It also introduced a shortcut, the accessi-
bility menu, which can be added to the navigation bar allowing
users to turn some accessibility features on and off from any
screen. This brings up an accessibility menu on screen and
users can customize the settings. Since Android 10, the acces-
sibility volume provides quick access to volume and brightness
controls as well and it allows users to enlarge the buttons.
After having been removed in Android 7, Google brought
back the dark mode option (bright text on a dark background)
with Android 9 (Pie). It allows the user to change colors or
contrast using 'high contrast text' or 'color inversion' options.
Since Android 10 the Dark Mode is available through the acces-
sibility menu. This is equivalent to what Apple has undertaken
with color filters in display accommodations. 'BrailleBack'
works with Talkback for a combined speech and braille experi-
ence enabling the user to add a braille display via Bluetooth.
There is also the addition of a 'Click after cursor stops moving'
option, which helps people with dexterity issues or with low
vision. Also popular is the addition of a large mouse cursor.
186 Accessibility
Accessibility features in the latest Android version include
(but are not limited to) things such as:
Speech output:
Display settings:
187 Accessibility
Touch or switch settings:
Audio or captions:
188 Accessibility
— Accessibility timeouts - Allows users to increase the
timeouts in an app.
14 developer.android.com/guide/topics/ui/accessibility
15 developer.android.com/training/accessibility/index.html
16 developer.android.com/guide/topics/ui/accessibility/apps.html
17 developer.android.com/tools/testing/testing_accessibility.html
18 developer.android.com/tools/support-library/index.html
19 youtube.com/watch?v=Y_8ZlUP2C5o
189
iOS App Accessibility
Apple was the first company to embed accessibility features
directly into the OS. Because of this, the support for accessi-
bility in iOS is a little better than in Android, although Android
is fast catching up. There are certainly comparable features
now but it is a legacy issue as Apple was the first to move
into this area. A lot of blind and partially sighted users also
find the gestures in iOS easier to use and the experience more
consistent.
With iOS 12 some of the accessibility features have moved
from accessibility settings into display settings. You can now
also use Siri to turn functions and features on and off on the
device. This demonstrates that people are now recognizing that
some of these settings are relevant for everyone. Accessibility
is going mainstream as people just want to make the display
more personal to them and have a device that is easy to use.
This means it is even more important that developers consider
accessibility settings when creating apps as the number of
people using these features has increased.
There have been some hardware changes with the iPhones X
and X+ as the home button has been removed. Haptic feedback
is now natively deployed across the OS. If you use a 'picker
wheel', it now delivers a discernible click when it is moving
through options. This is a mainstream usability feature but
certainly enables some disabled users to use the picker wheels
more easily. Apple has also put more granularity into the
haptic feedback that they provide, to allow the user to adjust
the settings.
Some of the accessibility features in iOS include, but are
not limited to:
190 Accessibility
Speech output:
Speech input:
Display settings:
191 Accessibility
— Larger Text and large accessibility sizes - This can help a
broad range of people from those who use glasses, through
to partially sighted people and those with learning dif-
ficulties. Large accessibility sizes allow users to touch and
hold on tabs or buttons and they will be shown in a large
pop up in the middle of the screen.
— Bold text - This can help a broad range of people from
those who use glasses, through to partially sighted people
and those with learning difficulties.
— Buttons shapes - Removes the line (or shading on older
OS) from button text.
— Reduce transparency - Reduces the transparency of
backgrounds which makes the text easier to read for
people with low vision.
If you are working on iOS, make sure check out Apple's De-
veloper area20 and to follow Apple's accessibility guidelines21.
These guidelines detail the API and provide an excellent source
of hints and tips for maximizing the user experience with your
apps.
Apple also provides some helpful guidance on testing the
accessibility on your app with Voiceover22 . Another useful link
provides more information on how to make sure that the app
reacts correctly to display settings23.
20 developer.apple.com/accessibility/ios
21 developer.apple.com/library/ios/documentation/UserExperience/Conceptual/
iPhoneAccessibility/Introduction/Introduction.html
22 developer.apple.com/library/ios/technotes/TestingAccessibilityOfiOSApps/
TestAccessibilityonYourDevicewithVoiceOver/
TestAccessibilityonYourDevicewithVoiceOver.html
23 developer.apple.com/documentation/uikit/uiaccessibility
194 Accessibility
— Disable autoplay - This setting allows users to disable
autoplay for videos extending the previous option (which
applied only to certain apps) system-wide for all Apple
apps and allows developers to extend this feature to third
party apps.
— Cross-fade screen transitions: - When Reduce Motion is
turned on, users will be able to change the way screen
transitions are shown.
— Differentiate without color: - Replaces color indications
with shapes or symbols that do not rely on color. It helps
people with color blindness or monochrome vision.
24 support.apple.com/en-gb/guide/iphone/iph3c511340/ios
195
Windows App Accessibility
This section is included as Windows tablets contain some
in-built accessibility features and it is useful to know about
these when developing for this platform. A brief overview of
the accessibility features is given below.
Speech output:
Speech input:
Display settings:
196 Accessibility
Touch or switch settings:
25 developer.microsoft.com/en-us/windows/accessible-apps
26 msdn.microsoft.com/en-us/library/windows/apps/hh700407.aspx
27 docs.microsoft.com/en-gb/windows/uwp/usability/index
28 w3.org/WAI/GL/mobile-a11y-tf
197 Accessibility
with the required work in this area. In WCAG 2.1 there are
additional principles aiming to address mobile access.
On the main W3C Mobile Accessibility page29 you can find
lots of helpful resources related to mobile accessibility.
It is suggested by the W3C that anything that uses HTML
and is web-based should still follow the Web Content Accessi-
bility Guidelines (WCAG) 2.0 while also referring to Mobile Web
Best Practices (MWBP). So if you are a web content developer,
then these guidelines are a good place to start. You will also
find Relationship between Mobile Web Best Practices (MWBP)
and Web Content Accessibility Guidelines (WCAG)30 a helpful
resource.
If your app is intended to mimic a native app look and feel,
then you should follow the guidelines mentioned above in this
chapter.
As support of HTML 5 is increasingly adopted on the various
mobile platforms, consider reading Mobile Web Application
Best Practices31 as this is likely to form the foundation of any
mobile web application accessibility standard that emerges in
the future. One of the other key areas of guidance is Accessible
Rich Internet Applications 1.0 (WAI-ARIA)32, as it has been
designed to ensure that more dynamic HTML functionality is
accessible to screen readers.
An interesting area of work happening at the W3C is in
the Independent User Interface (IndieUI) Working Group33.
The group states "Independent User Interface (IndieUI) is a
way for user actions to be communicated to web applications
29 w3.org/WAI/standards-guidelines/mobile
30 w3.org/TR/mwbp-wcag
31 w3.org/TR/mwabp
32 w3.org/TR/wai-aria
33 w3.org/TR/indie-ui-context
198 Accessibility
and will make it easier for web applications to work in a wide
range of contexts — different devices, different assistive
technologies (AT), different user needs". This work is going to
be very important for accessibility and device independence. It
is worth looking at the documentation that they currently have
available.
199 Accessibility
Marc van't Veer & Julian Harty
Testing
We would like our apps to be well tested so we have con-
fidence they will work and be positively received by their
audience. Your needs and approach to testing range from lone
developers testing an app themselves to mature, structured
teams where there is a team of dedicated software testers who
BY
201 Testing
Key Areas of Testing
When implementing testing into your projects, here are some
key areas we recommend you include.
Organisational Awareness
A development team is usually embedded in an organization.
This organization should be setup in a way that encourages
sharing mobile testing knowledge across all the teams. If
possible, the development team should be located together.
The organisation's release heartbeat should fit the mobile app
team's schedule (every day, week, sprint) and a mobile test
policy should be in place that defines the testing framework
and have a test strategy on different layers (multiple environ-
ments, scope, architecture, end-users).
Test Environment
Test environments are where we will perform the testing. They
include many facets. ISTQB defines test environment as: "An
environment containing hardware, instrumentation, simulators,
software tools, and other support elements needed to conduct
a test."1.
Your goal should be to have at least one environment that
provides production-like data variations, settings, conditions
and infrastructure which is comfortable to use for testers.
Often a testing environment includes special software tools
and utilities, e.g. to read and filter log files, to control network
behavior, to represent systems the app depends on including
third-party authentication, to create test accounts etc. Often
you will find solutions available already, but sometimes you
might end up creating your own tools, for instance to mock the
1 istqb.org/downloads/send/20-istqb-glossary/186-glossary-all-terms.html
202 Testing
behavior of an application server, to be able to inject errors,
and so on.
Testers love to have multiple test environments from
development all the way into production; this is called a
"DTAP" phased approach: "Development, testing, acceptance
and production environments"2 . Each environment reflects a
stage in the life cycle of any app and allows testing in each of
these stages.
2 en.wikipedia.org/wiki/Development,_testing,_acceptance_and_production
5 vodafone.nl/shop/mobiel/abonnement/extra-opties/smartlife/wallet/reizen
203 Testing
so on, can adversely affect the UX and may have significant
impact, for instance, if users are denied access to transport,
money, and more.
A basic strategy for testing mobile apps is to assume that
every combination is unique and different from another and
may behave slightly differently, however, it would be impracti-
cal to test each combination. A more fruitful approach is to
invest time in learning what the impact of the differences are,
and testing a subset of the combinations that maximize the
insights and confidence we have in the behavior of the app
across as many of the combinations as practical. Key skills
include:
— Device analysis: Which devices are the ones that are used
among your target audience? What are the main differ-
ences? When and how are these differences relevant to the
app? Which differences can be ignored?
— Extrapolation: What does a test on one device say to the
thousands of devices out there in the wild?
204 Testing
The set of test devices to use needs to be reviewed on an
ongoing basis, as the app and the ecosystem evolve. Also, you
may identify new devices, that your app currently does not
support, during your reviews. The following figure illustrates
these concepts.
Possible
Device
Database
Installed Target
Device Device
Database Database
205 Testing
Virtual devices
Virtual devices run as software, inside another computer, they
are often free and immediately available to install and use.
Some platforms, including Android, allow you to create custom
devices, for instance, with a new screen resolution which
you can use for testing your apps before suitable hardware is
available. Virtual devices can provide rough-and-ready testing
of your applications. Key differences include: performance,
security, and how we interact with them compared to physical
devices. These differences may affect the validity of some test
results. Beside the Android platform virtual devices, you can
use GenyMotion.com, who provide faster and more capable
Android emulators, for instance to control the values of various
sensors.
Physical devices
The performance characteristics of various phone models vary
tremendously from virtual devices on your computer. So: buy,
rent, beg or borrow phones to test on. A good start is to
pick a mix of popular, new, and models that include specific
characteristics or features such as: touch screen; physical
keyboard; screen resolution; networking chipset, et cetera.
Unless your target group only uses a certain type of phones,
try your software on at least one low-end or old device as you
want users with these devices to be happy too.
Here are several aspects to test explicitly on physical
devices, as the devices have a significant impact on these
aspects:
206 Testing
— Navigating the UI: For instance, can people use your
application with one hand? Effects of different lighting
conditions: the experience of the user interface can differ
in real sunlight when you are out and about. It is a mobile
device – many users will be on the move. Rotate the
screen and make sure the app is equally attractive and
functional.
— Location: if you use location information within your
app: move – both quickly and slowly. Go to locations with
patchy network and GPS coverage to see how your app
behaves.
— Multimedia: support for audio, video playback and record-
ing facilities can differ dramatically between devices and
their respective emulators.
— Internet connectivity: establishing an internet connec-
tion can take an incredible amount of time. Connection
delay and bandwidth depend on the network, its current
strength and the number of simultaneous connections.
Test the effects of intermittent connectivity and how the
app responds.
Remote devices
If you do not have physical devices at hand or if you need
to test your application on other networks, especially abroad
and for other locales, then one of the ‘remote device services’
might help you. They can help extend the breadth and depth
of your testing at little or no cost. Device farms are becoming
commonplace and are clearly strategic where Google6 and
Amazon7 in particular now provide them.
6 firebase.google.com/products/test-lab
7 aws.amazon.com/device-farm
207 Testing
You can also use commercial services of companies such
as SauceLabs.com, Testdroid.com, PerfectoMobile.com or
Sigos.com for similar testing across a range of devices and
platforms. Some manufacturers brand and promote these
services. However you often have to pay for them after a short
trial period. Some of the commercial services provide API’s to
enable you to create automated tests. You can even create a
private repository of remote devices, e.g. by hosting them in
remote offices and locations.
Beta Testing
Another possibility, to increase the pool of devices, is to in-
volve end users in the testing; for instance using beta testing.
In this way the mobile app is on the devices and in the hands
of end-users in their own environment. These devices are not
controlled in any way. Extra tooling is needed to distribute
the app and to capture the feedback from end-users. Check
Ray Wenderlich's blog for more info on IOS beta testing8 and
Android's Developer portal9 if you are targeting Android.
8 raywenderlich.com/5352-testflight-tutorial-ios-beta-testing
9 developer.android.com/distribute/best-practices/launch/test-tracks
208 Testing
and versions; and be able translate requirements from different
perspectives into tests. Additionally, a tester should be familiar
with the Agile/Scrum testing approach, risk analysis, test
strategies and be able to use all sorts of tools during testing
manually and automatically.
For professional QA training and certifications, you might
want to evaluate the offering of the ISTQB (International
Software Testing Qualifications Board)11.
Beside these functional skills, testers should be able to
deliver feedback effectively. Today's world of software develop-
ment is characterized by agility: Apps are developed and
released in small iterations (sprints) that reflect the constant
improvement based on end-user feedback and other stakehold-
ers' input. The tester is one of these stakeholders and needs to
deliver his/her input in a way that is constructive and enables
developers to implement improvements within a sprint cycle.
In this setup, a tester is rather a coach on quality than the
gatekeeper of quality.
To prevent feedback being received as negative criticism
there are a number of guidelines to follow12 . As a suggestion,
try to make your team appreciate bug reports instead of
perceiving them as criticism of their work.
A good way to constantly improve is pair testing. Pair test-
ing is a technique in which two team members work together
at one computer to test the software application. Pair testing
can also be done together with a developer or designer13.
11 See istqb.org for some general testing qualification paths and check their
mobile specific offering at istqb.org/certification-path-root/mobile-
application-testing
12 See teachthought.com/pedagogy/20-ways-to-provide-effective-feedback-for-
learning
13 See stickyminds.com/article/many-advantages-pair-testing to learn more
about pair testing
209 Testing
Apply Testing Techniques
To make sure your testing covers all relevant areas of your of-
fering, a couple of mnemonics might help in memorising those:
14 kohl.ca/articles/ISLICEDUPFUN.pdf
210
— COP FLUNG GUN15 summarizes similar aspects under
Communication, Orientation, Platform, Function, Location,
User Scenarios, Network, Gestures, Guidelines, Updates,
Notifications.
Tours
Tours are an experience-based test technique. It help us focus
on what and how while we are testing a mobile app.
Tours help you focusing on your testing, Cem Kaner
describes a tour as "a directed search through the program.
Find all the capabilities. Find all the claims about the product.
Find all the variables. Find all the intended benefits. Find all
the ways to get from A to B. Find all the X. Or maybe not ALL,
but find a bunch."16. With the combination of different tours
in different perspectives (see the I SLICED UP FUN heuristics)
coverage and test depth can be chosen.
Examples of Tours17 include:
15 moolya.com/blogs/2014/05/34/COP-FLUNG-GUN-MODEL
16 kaner.com/?p=96; also see developsense.com/blog/2009/04/of-testing-
tours-and-dashboards/
17 from michaeldkelly.com/blog/2005/9/20/touring-heuristic.html
211 Testing
— Structure tour: Find everything you can about what
comprises the physical product (code, interfaces, hardware,
files, etc.).
— Variability tour: Look for things you can change in the
application - and then you try to change them.
Mobile Analytics
Mobile Analytics can help testers to identify differences in
various aspects, e.g. performance and power consumption of a
service's infrastructure when the app is being used by many us-
ers on a vast variety of devices. Some compelling examples of
differences in behavior and on ways issues were addressed in a
paper published by computer scientists from the University of
Wisconsin18.
Analytics is about finding trends in big numbers. This means
to transforming raw data into meaningful patterns and act
accordingly. To discover patterns in the collected data, there
are (in general terms) four steps: 1. creation, 2. recording,
3. processing, 4. asking questions. More info about finding
patterns can be found in another article of mine published as
a PDF entitled "The magic of the mobile numbers: Testing with
the power of analytics"19.
19 polteq.com/wp-content/uploads/2017/10/The-magic-of-the-mobile-
numbers-Marc-van-t-Veer-2017.pdf
212 Testing
HP Enterprise also offers a book on the confluence between
mobile analytics and testing for mobile apps20.
See the chapter about Mobile Analytics to learn more about
how analytics can help you assure your app's quality.
20 themobileanalyticsplaybook.com
21 nngroup.com/articles/why-you-only-need-to-test-with-5-users
213 Testing
testing. For instance, by preparing the tests, processing log
files, and analyzing results.
Whenever you include external people to test your app, they
need ways to access and use the app. Web apps can be hosted
online, perhaps protected using passwords, hard-to-guess URLs
and other techniques. Installable apps need at least one way
to be installed. For instance using a corporate app store or
specialist deployment services like AppCenter (formerly known
as HockeyApp)22 . When the app is closer to being production-
ready, users can test the more mature version of the mobile
app in alpha & beta tests phases. See the platform chapters to
get some hints on your options in that regard.
Crowd Testing
There are various services available that facilitate pre-
production testing by external people, often so called micro-
jobbers: Crowdtesting service providers include Applause.com,
PassBrains.com, and TestBirds.de. Lookback.io provides a
different more personal flavor. All of them usually offer you
the option to define certain test cases or areas of your app as
well as narrowing down the type of users you are interested in
getting feedback from. Crowdtesting can also help to cover a
wider range of real devices. But you should keep in mind that
crowd-testers are often paid per bug. So do not trust their
observations blindly. Always be able to validate them on local
physical devices.
22 appcenter.ms
214 Testing
API Testing
An Application Programming Interface (API) is very often a key
element of mobile offerings. They are abstracting a system's
underlying implementation and only expose objects or actions
a developer needs. As an example, a server API provides data
to a mobile app in a format both have agreed upon. If the
API does not deliver that data in the defined format or in a
performative manner, the app will be perceived as buggy or
slowly. Testing the API separately from the mobile app has
many advances, like faster and easier business logic testing,
ease of automation, earlier detection of defects and their root
cause, creation of test data for app testing, easier reproduction
of bugs and having a monitoring tool for production issues
(regression).
To start (headless) testing the API directly can feel like
opening up the box of Pandora with terms like JSON, REST,
Mocks/Stubs, Proxy, HTTPS error states and debug logging. But
also, a world of useful special tools opens up: Popular tools
like Postman23, Swagger24 and Charles Proxy25 will make your
life as a tester a lot easier.
By helping providing stable APIs you will be helping
delivering a more robust app experience.
To learn more about this topic, check ApiEvangelist.com26,
ProgrammableWeb.com and Guru99.com/api-testing.
23 getpostman.com
24 swagger.io
25 charlesproxy.com
26 especially apievangelist.com/2018/01/12/api-life-cycle-basics-testing
215 Testing
Manage your Testing Time
Testing as you have discovered can take many hours. Far
more than your time allows. Particularly if you are close to a
deadline such as a release date. There are various ways you can
manage time spent in testing, in parallel testing can be made
more interesting, rewarding, and more productive.
216 Testing
— Scaling testing: Increase the throughput of testing by
scaling it. For instance using test automation, cloud-based
test systems and more humans involved in the testing
can help increase the volume, and potentially the quality,
of the testing. Using static analysis tools to review code
and other artifacts can also help the team to find and fix
problems before the app is released.
— Test automation: Automate what you can automate but
keep it simple. Start during design by assigning what
should be automated on unit and API level. Prepare
the mobile app with accessibility labels and select user
scenario's that every user touches. Then start thinking
about UI automation.
217 Testing
Defect Analysis
As stated above, the main purpose of testing is creating
feedback, mostly based on the defects (aka bugs) found. A
defect is a deviation from the expected behavior in the eyes of
the user27. To be sure that a certain behaviour is unexpected,
of course, a clear understanding of the expected behaviour is
needed. This is one of the reasons where effective documenta-
tion can be particularly useful.
Any bug is a chance to learn and improve. To fix a bug
completely you need to know its root cause(s) otherwise you
may just fix a symptom or an isolated instance of a broader
issue. Mobile defects often originate often from combinations
of multiple factors such as OS versions, outdoor conditions,
other apps, timing issues, end user interaction, unexpected
data input, limited memory, server outages etc.
The process of finding the cause is called defect analysis.
Taxonomy
Once you start researching, you will see that there are complex
studies available on how to detect the root cause of a bug.
Many people have graduated on this topic. In Ajay Kumar Jha's
work on defect analysis28, he created a repository, a taxonomy
of possible risks. If these risks becomes reality, then there is a
defect in the mobile app. His idea behind the taxonomy defect
analysis method is to "define feature categories and collect
lists of possible bugs in each category".
A good place to build a taxonomy, is the app store reviews.
218 Testing
Both Google's Playstore and the iOS App Store lets you export
all reviews29 which you can then use as a basis for your defect
analysis.
A defect taxonomy may help you to create better tests, see
Cem Kaner's30 and Michael Stahl's online articles31 to learn
more.
S-FMEA
A second approach for analyzing defects is S-FMEA (Software
Failure Mode and Effect Analysis32). The S-FMEA method
is looking for structural problems in a system design. First
you define possible failure modes, then you examine its
consequences on different system levels as part of the effects
analysis. S-FMEA can support the decision-making process
during the architectural planning of a system. This means that
there are alternatives choices and each choice can lead to
different failure modes of the application and have different
effects. Understanding this relationship and making the right
decisions can lead to a more robust design and mobile app.
29 check support.google.com/googleplay/android-developer/
answer/138230#export_ratings_and_reviews and help.apple.com/app-
store-connect/#/devd15088dd0 elp.apple.com/app-store-connect/#/
devd15088dd0 to learn how
30 semanticscholar.org/paper/Bug-Taxonomies%3A-Use-Them-to-Generate-
Better-Tests-1-Vijayaraghavan-Kaner
31 stickyminds.com/article/using-bug-taxonomy-design-better-software-tests
32 See "An Introduction to Software Failure Modes Effects Analysis (SFMEA)":
slideshare.net/AnnMarieNeufelder/an-introduction-to-software-failure-
modes-effects-analysis-sfmea
219 Testing
Learn More
Testing mobile apps is becoming mainstream with various good
sources of information. Useful online sources include:
— katrinatester.blogspot.de/2015/08/mobile-testing-pathway.
html - A comprehensive and well-presented set of possible
steps for testing mobile software.
— github.com/julianharty/testing-heuristics - An online open
source project to learn more about testing heuristics for
mobile apps.
— enjoytesting.files.wordpress.com/2013/10/mobile_test-
ing_ready_reckoner.pdf - Contains short, clear testing ideas
with examples, mainly for Android devices
— developers.google.com/google-test-automation-conference
- The annual Google Test Automation Conference (GTAC)
often includes several presentations on testing mobile
apps. These are recorded and available free of charge.
Worth watching.
— genymotion.com/blog/android-testing-showdown - A useful
guide on selecting the best devices to test on.
— appqualityalliance.org/resources - The official App Quality
Alliance AQuA website including their useful app testing
guidelines.
220 Testing
A good place to start learning testing mobile apps is
reading books like:
221
Linda Harnisch
Monetization
For developers, mobile has democratized access to billions of
BY
1 sensortower.com/blog/app-revenue-and-downloads-2018
2 sensortower.com/blog/top-grossing-apps-worldwide-may-2019
3 statista.com/statistics/276623/number-of-apps-available-in-leading-app-
stores
4 statista.com/statistics/266211/distribution-of-free-and-paid-android-apps
223
Monetization Models
Assuming you are not developing your app as a hobby, you
probably want to turn it into a source of revenue. This is
where app monetization models come into play. This should be
incorporated into your business plan well before the launch of
your app.
This chapter will explore dominant app economy monetiza-
tion models that are somehow dependent on the main app
stores:
224 Monetization
Considerations For Your Monetization
Strategy
Ensuring your mobile app is economically viable requires
defining a monetization strategy from day one. Choose an app
monetization strategy that will allow you to profit off your
development efforts and costs.
App Vertical
Some verticals lend themselves to certain forms of monetiza-
tion. What problem does your app solve and which service does
it provide? If you are offering a content centered service such
as a music or video streaming service (think Spotify or Netflix),
a subscription model will be profitable. Freemium models,
on the other hand, are lucrative for apps that want a mix of
revenue such as ads or in-app purchases (think gaming apps).
Platform
One of the factors that impact your revenue is the platform
you are developing for. Whether you are developing for iOS
or Android (or both) impacts your monetization capabilities
due to market penetration and platform popularity. Looking
at the two major app stores, Apple is generally the platform
that is seeing maximum revenue growth. Basically twice as
much as what Google Play Store is making in terms of in-app
purchases, subscriptions and premium apps. According to data
by Sensortower, the stores saw a combined 19.5 billion USD in
consumer spend in the first quarter of 2019; users of Apple’s
App Store spent 12.4 billion USD and Android users 7.1 billion
USD in the Play Store5.
5 sensortower.com/blog/app-revenue-and-downloads-q1-2019
225 Monetization
Competitors
Research what competitors in the same app vertical are doing.
How do they monetize; and is their chosen approach working
for them? Maybe you will find a gap or a niche that you can
fill.
User Acquisition
Of course, app monetization is not possible if you do not have
a significant volume of app installs. You need to have a large
amount of MAUs (monthly active users) to earn sustainable
revenue. This definitely holds true for the in-app advertising
model. This is where user acquisition (UA) strategies step in.
With this edition, we added a dedicated chapter about user
acquisition to our guide. Make sure to read it carefully.
User Experience
Your monetization strategy should complement your app’s user
experience and fit organically within the app. If you put ads
into your app, make sure that this is seamlessly done. You will
want to choose a marketing partner/network that supports
interactive ads as well as analytics and targeting.
226 Monetization
Value Proposition & Pricing
In the ASO chapter of this guide you will learn how to create
an app store listing that communicates the value of your app.
It will help you convert app searchers into paying users if you
clearly communicate your value proposition.
If you are choosing the pay per download model you should
offer an attractive price tag. According to Statista, the average
price in 2019 for an app on the App Store is 1.01 USD6.
6 statista.com/statistics/267346/average-apple-app-store-price-app
7 statista.com/statistics/271674/top-apps-in-google-play-by-revenue
8 "New Report on Global In-App Spending Habits Finds That Asian Consumers
Spend 40% More In Apps Than the Rest of the World": bit.ly/29OJNvi
227 Monetization
in acquiring an active enough user base where that amount of
money turns into a sustainable revenue for your app.
Most app stores offer an in-app purchase option, or you
can implement your own payment mechanism. It should also
be obvious that you will need to design and develop your
application to incorporate the in-app payment method. If your
application is implemented across various platforms, you may
need to implement a different mechanism for each platform (in
addition to each app store, potentially).
As with pay per download, we would recommend that you
start with the in-app purchasing mechanism offered by an
app store, particularly as some of these can leverage operator
billing services (such as Google Play) or utilize pre-existing
credit card information (such as Apple or Amazon), or with
in-app payment offered directly by operators. From a user’s
perspective, this is the easiest and most convenient way to
pay, so developers can expect the highest user acceptance and
conversion rates.
228 Monetization
Subscription Models
Monetizing apps through subscription is gaining momentum.
In-app subscriptions are a subset of Freemium/IAP, essentially
letting users download an app for free initially. Users can then
access a limited amount of content before being prompted
to pay for premium content or features. Subscriptions are
lucrative for apps that are content-driven such as newspaper-,
dating-, music streaming and utility apps. Spotify’s9 freemium
success story is often quoted as the best example10 of an
app for turning freemium into a billion-dollar business with
subscriptions.
Subscriptions take IAP to the next level. Instead of paying
only once for an upgrade, users make regular payments bring-
ing in steady revenue. By continuing their subscription, users
are encouraged to interact with the app. This boost in user
retention rates is quite profitable to cover long-term develop-
ment costs. On the other hand, it means you want to keep user
churn low. You can read more on preventing users to churn in
the "User Retention" chapter.
The pricing structure of subscription models has become
more complex and varied. In fact, they mirror the pricing
model of a SaaS (Software as a Service)11 by now. App develop-
ers charge users either a monthly or yearly fee for the app and
offer multiple subscription options, as well as an option that
combines all the services in a premium package.
In-app purchases and subscriptions for your mobile app
are both managed by Apple (iOS) and Google (Android). In
order to set up subscriptions in the app you should implement
9 spotify.com
229 Monetization
Apple’s In-App Purchase API12 or the Google Play Billing API
for Android13. Apple is especially pushing for subscriptions
by offering incentives for developers. For the first year of any
user's subscription, Apple will get 30 percent of the App Store
purchase. Google is taking a 30 percent cut of developer’s
revenue as well. In 2016, Apple changed its policy to take only
15 percent of the marketplace fee once customers subscribe
for more than a year. Yet, some brands such as Netflix14, Epic
Games and lately Tinder15 have decided to bypass the stores,
instead directing their users to the web or other platforms in
order to avoid fees - with mixed results16.
In September 2019 both major mobile platform providers
launched their very own subscription services: Apple Arcade
offers exclusive access to games while Google's Play Pass also
includes apps.
12 developer.apple.com/app-store/subscriptions
13 developer.android.com/google/play/billing/billing_overview
14 "Netflix stops paying the ‘Apple tax’ on its $853M in annual iOS revenue",
tcrn.ch/2F2eVFW
15 "Tinder is now bypassing the Play Store on Android to avoid Google’s 30
percent cut", bit.ly/2OkFSuK
16 mobiledevmemo.com/spotify-vs-apple
230 Monetization
it involves minimal setup costs and minor administrative
overhead.
As the mobile economy and monetization strategies have
matured over the years, today only 3 percent of non-gaming
app revenues are generated through paid app downloads17.
Aggregated data by Statista shows that global mobile app
revenues through PPD have experienced a slowdown for a
number of years by now18. Pay per download generated about
29 million US Dollars in 2017; compared to IAP accounting for
about 37 million USD19.
The benefit of the paid-app approach is that developers
earn revenue upfront. User retention or lifetime value do
not carry such a big weight. Yet, as pointed out above, the
majority of apps these days are available for free. Users find
it a standard practice to not pay for an app product that they
have not even tried out yet. The tendency for PPD can hardly
be called strong or profitable for app publishers nowadays.
17 statista.com/statistics/273120/share-of-worldwide-mobile-app-revenues-by-
channel
18 statista.com/statistics/273122/global-paid-for-mobile-app-revenues-forecast
19 braze.com/blog/in-app-purchase-stats
231 Monetization
Why has freemium become so dominant? Unlike pay per
download (PPD), the freemium model appeals to users’ desire
to test an app before buying it. It allows you to hook a good
deal of first-time users before charging them while trust is
built. You have to engage users enough before turning them
into buyers who are willing to spend for a more increased
experience. Therefore, gaining revenue from freemium depends
very much on user engagement.
In-App Advertising
Generating revenue by displaying advertisements in your
mobile app has become a viable method for driving conver-
sions. Once you have decided to advertise with ads you have
to choose an ad network20 to monetize your app and add its
SDK to your app. Each network offers slightly different ap-
proaches specializing in individual ad formats, pricing models,
geographic regions and advertiser types.
Most often the ad networks’ revenue for your app does not
scale at the same rate as your users base does. There will be is-
sues with monetizing all the different geographies or different
ad types. You will soon realize that though you are generating
revenue from your user base, you are introducing problems
around CPM (we will explain this payment model) and keeping
the competition with different ad sources you are working
with. Thus, instead of working with one ad network SDK, you
have to start working with several SDKs as your users continue
to scale. That is a lot of SDKs to manage and may even slow
down your app and affect performance. The complexity within
your app will be huge.
Ad mediation platforms such as AdApptr.com or MoPub.com
can can help you optimize ad revenue and solve some of the
232 Monetization
problems of scaling your ad monetization. As you are working
with a mediation platform you have one single mediation SDK
that gives multiple different ad networks access to your inven-
tory and then gets them all to compete. Now you only have
one simple integration making sure that the highest bidder
wins by comparing what CPM all the various ad networks are
offering. Working with mediation is the way to go, to get the
most out of your inventory, optimize your CPM and increase
your ad revenue.
The app advertising industry keeps evolving and so do ad
formats that app developers can choose from:
233 Monetization
— Playable ads: Offers users a taste of gameplay inside the
app. Usually, there is a CTA21 at the end prompting users
to download.
— Offer Wall: Offerwalls are placed inside an app listing
multiple offers that provide users with incentives in
exchange for completion of specific actions.
21 Call to action
234 Monetization
decide whether a user clicks or even downloads the advertised
app are well outside of the control of the developer/owner of
the ad inventory.
CPC (cost per click)
The price an advertiser pays each time a user actually clicks
on an ad. CPC is a pricing model utilized in user acquisition
(UA) campaigns. The advantage is that advertisers pay nothing
for ads that do not generate clicks. However, as an advertiser
you get charged for errant clicks that do not result in a lead
or customer action. The drawback for app publishers presents
itself in potentially serving ad impressions for free.
CPA (cost per action)
With this pricing model, the advertiser pays for clicks on
their ads that lead to an action by a user (purchase, sign up,
app download, subscription). This is beneficial for advertiser’s
UA campaigns since they only pay for specific outcomes. The
drawback and risk for app publisher and developer: Serving ad
impressions and generating clicks without actually generating
a conversion (meaning they do not get any money).
CPI (cost per install)
The price an advertiser pays whenever the consumer installs
the advertised application. Hence, this pricing model is
especially used in UA campaigns. Advertisers find this model
favorable since they only pay for users that install the app
after seeing an ad promoting it. CPI emphasizes app down-
loads and installs so the advertisers get what they pay for.
Yet, there are other creative ways of monetizing your app
through mobile advertising. Don’t constrain yourself and
explore other popular approaches to boost your revenue.
235 Monetization
Ad-Free Sponsorships
The sponsorship approach involves collaborating with brands
who grant users rewards upon completing in-app actions. The
sponsorship is integrated into the app which means no ads
are displayed. When rewards are redeemed, app developers will
get part of the revenue. Take Apponsor.com for instance. The
user gets your app for free and is prompted to sign-up for a
newsletter of your sponsor. In return, the sponsor will pay the
developer an amount for each newsletter registration. It kind
of works like an affiliate app program.
Data Monetization
As an app developer, you have access to an incredible amount
of user data. This is a goldmine for digital and offline busi-
nesses alike. It reveals insights about consumers that these
businesses can use to analyze their audience or product
improvement.Yet, you need a great amount of daily active
users (DAU) to employ data monetization at all. So-called
data collectors will only get non-personal information such as
device type or device version. We especially recommend these
articles to learn more about data monetization, how to gather
it correctly while also being trustworthy to your app users:
Indirect Sales
Another option is to use your application to drive sales else-
where. Use your app as a marketing tool to sell goods in the
real world. Typical examples are car apps, magazine apps and
236 Monetization
large brands such as McDonald’s and Starbucks. Also, coupon
applications like Groupon often use this business model.
22 statista.com/statistics/269025/worldwide-mobile-app-revenue-forecast
23 statista.com/statistics/692559/leading-mobile-games-publishers-google-
play-world-revenue
24 "Tinder becomes the top-grossing, non-game app in Q1 2019, ending
Netflix’s reign", tcrn.ch/2KqWcZb
25 sensortower.com/ios/us/tinder-inc/app/tinder/547702041
237 Monetization
question depends on a lot of different factors such as size of
development studio, location, coding experience and mobile
platform choice (iOS or Android). According to the developer
salary guide by Business of Apps, an average annual salary of
a mobile app developer in the US is 107,000 USD, 47,000 USD
in Germany and significantly lower in India with 4,100 USD26.
Keep in mind that the local economy plays a significant part in
the earnings though.
Last but not least, app developers want to consider moneti-
zation beyond mobile devices for future endeavours. There is
an emerging market for additional smart devices and platforms.
Think smart TVs, smartwatches and video game consoles to
watch in future growth and monetization opportunities.
26 bit.ly/2Sy2R3X
Learn More
239 Monetization
Laura Spikermann
1 statista.com/statistics/276623/number-of-apps-available-in-leading-app-
stores/
2 searchads.apple.com/
3 appradar.com/academy/what-is-app-store-optimization
Platform Differences
When talking about ASO, it is important to have an overview of
the different elements which can be optimized, and understand
the differences between the Google Play Store and the Apple
App Store in which your apps are published.
243
Google Play Store
Let us start off with Android and the metadata presented in
the Google Play Store. There are seven main on-page elements
to consider when optimizing the appearance of your app in the
Google Play Store:
1. Icon
2. App Title
3. Category
4. Promo Video and Feature Graphic
5. Screenshots
6. Short Description
7. Long Description
4 developer.android.com/distribute/best-practices/grow/store-listing-
experiments
9:41
Apps
App Title
Company / Subtitle
GET
3.5 #
0 0+
2500 Ratings Category Age
7
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
diam nonumy eirmod tempor invidunt ut labore et dolore
magna aliquyam erat, sed diam voluptua. At vero eos et
accusam et justo duo dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing
elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos
et accusam et justo duo dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing
elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos
et accusam et justo duo dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit amet.
HEADLINE
1. Icon
2. App Title
3. Subtitle
4. Preview Video
5. Screenshots
6. Category Ranking
7. Long Description
8. Keywords (not visible)
— AppTweak.com
— TheTool.io
— MobileAction.co
— AppRadar.com
— AppAnnie.com
— SensorTower.com
01 02
Derive keywords from Analyze apps of the
the features and competition to find
benefits of the app new inspirations
04 03
Analyze volume Regularly repeat
and competition keywords analysis to
per keyword identify trends
App Title
Keywords in your app title have a lot of weight in the
algorithm of both app stores. Therefore, try adding your most
valuable and most relevant keywords in your app title to
increase your app’s discoverability. Choose an app title that
contains relevant keywords, but still fits the purpose of your
app and the guidelines of your brand. It should be a simple,
memorable title that hints at what your app does. The best
practice to add additional keywords to your app title is to
put your app name first and then use a “:” or “-” to fill the
remaining characters with relevant keywords. Apple allows a
maximum of 30 characters for the app title while the limit on
Google's Play Store is 50 characters.
Long Description
Within the long description you can highlight features and
functions of your app and guide the user on how to access the
full potential of your app. Let potential users know what makes
your app unique and why they will love it. The long description
is only indexed by the algorithm of the Google Play Store,
and not in the Apple App Store. When optimizing your long
description for the Google Play Store, use your relevant key-
words as often as possible while maintaining a meaningful and
relevant content. For the long description, a good structure is
vital. Subheadlines are a good way to enable interested users
to quickly find relevant information. To keep it simple, you can
reuse the content from your optimized long description from
the Google Play Store for the Apple App Store. Keep in mind
that changes on the Apple App Store can only be applied when
publishing a new version of your app, while changes on the
Google Play Store are possible at any time.
Apple as well as Google have set a limit of 4,000 characters
for long descriptions. In Google's Play Store you can also use
HTML formatting and emojis.
5 developer.android.com/distribute/best-practices/grow/store-listing-
experiments
Category
Choosing the right category for your app to be listed in is
crucial. It will influence how users can discover your app while
browsing through the app stores. The position of your app in
the category ranking depends on the number of downloads
and uninstalls, as well as your ratings. The higher the number
of downloads and the better the star-ranking for your app,
the higher you will be listed in the chosen category. On the
Apple App Store you can choose 2 categories, a primary and
a secondary category. You will only be listed in your primary
category. The secondary category only serves as a keyword,
e.g. picking the "navigation" category for the secondary will
improve your ranking for the keyword "navigation”. On the
App Icon
The app icon is the very first visual element a user sees when
finding your app in the app stores. Having a great icon does
not necessarily guarantee tons of downloads, but it might help
to get users to explore your app in more depth. A clean and
eye-catching app store icon that is recognizable and under-
standable will make your app stand out from the crowd.
Both stores require the icon to have a size of 512px by
512px. More detailed information on how to design your app
icon can be found online under:
6 support.google.com/googleplay/android-developer/answer/113475?hl=en
7 developer.apple.com/app-store/categories
Screenshots
Screenshots allow you to comprehensively and visually
communicate the best features and the most outstanding
value propositions of your app. The screenshots are one of the
most valuable elements on your app store page. Since visual
information can be processed quickly by the human brain,
potential new users are able to gain lots of information about
your app by quickly looking at the screenshots. Make sure
to provide them with relevant information and an appealing
design to optimize your conversion rate.
There are numerous ways to conceptualize and design your
screenshots. Viable approaches can range from a strict value
and feature show-off, to a more creative approach that empha-
sizes on emotions and artistic aspects. The main point is, that
potential new users should be attracted by your screenshots.
The screenshots will support potential users by deciding if your
app fits their needs and give them a first feel for your app.
Again there are some differences when it comes to the
two app stores which should be considered. On the Apple App
Store, one screenshot per localization is required, but up to
ten screenshots per device (iPhone, iPad, Apple Watch, tvOS)
Video
A video gives users a much more dynamic view into your
app, with the help of animations, sounds, music, and voice
captions. It is not required from the app stores but is recom-
mended as a fun and engaging way to present your app to
potential users. The video will be positioned in front of the
screenshots and is therefore highly visible.
On Apple's App Store, up to three videos can be uploaded,
but usually, one video should be sufficient. It will be shown
within the search results page and autoplay directly by
default. Therefore, having a video on the Apple App Store is
crucial, since it will be a moving element in the search results
page that will catch the attention of the user and increase
the visibility of your app. The length of the video should be
between 15-30 seconds and only in-app-footage is supposed to
8 help.apple.com/app-store-connect/#/dev910472ff2
9 support.google.com/googleplay/android-developer/answer/1078870
10 help.apple.com/app-store-connect/#/dev4e413fcb8
11 support.google.com/googleplay/android-developer/answer/1078870
Learn more
This chapter covered the basics of ASO which is an ever-evolv-
ing field. It is a complex topic and it is impossible to cover
everything within one chapter. Apple and Google are regularly
performing changes on their respective app stores which
can influence the requirements. Therefore, it is important to
frequently review the app store presence of your app and keep
an eye out for changes. We hope this chapter has aroused your
interest to learn more about ASO.
Here is a list of some elements which were not touched in
this chapter but are still relevant for ASO:
If you want to learn more, search for those terms online and
read on!
Users are oxygen for your mobile app. Regardless of how you
intend to make a living from your mobile business, you will
have a tough time making any money from it without having
a healthy user base that continually uses your app (even more
so if you tap into virtually any advertising-based business
models). In this chapter, we will look at the basic mechanics
behind acquiring and retaining users for your mobile applica-
tion as well as the different activities that are part of it.
The contents of this chapter have a significant overlap
with what would be called performance marketing in a lot of
online/mobile-first companies. Without wanting to go into too
much marketing theory here, performance marketing typically
describes all activities that have the goal of acquiring &
retaining users with the help of quantifiable marketing chan-
nels (so not Out-of-Home or print for example). If you want to
put it like this, the opposite of performance marketing is the
more traditional brand marketing where you will sometimes
even use the same channels as in performance marketing, but
the outcomes of your activities generally are very hard (or
downright impossible) to measure. Having said that, there is
still a significant amount of dependencies and interferences
between performance marketing and brand marketing1. In most
larger companies, these two fields of marketing are handled by
separate (but ideally well-connected) teams.
It is not a secret that performance marketing means big
business these days (particularly the user acquisition part)
1 thenext-us.com/2017/10/brand-marketing-vs-performance-marketing
2 appsflyer.com/blog/app-install-ad-spend-predictions-2017-2020/
Paid Media
Virtually any marketing campaign where you, either directly
or indirectly, pay money to the owner of the ad inventory
(that displays the ad for your product or service) falls into the
category of paid media marketing campaigns. There are some
common examples of companies that only exist because they
offer paid media campaigns (say Google and Facebook), gener-
ating the vast majority of their overall revenue in advertising,
north of 80% to be more precise5.
Paid media campaigns emit an almost magical appeal to
marketing managers as they all come with the same highly
attractive yet easy to understand value proposition: You insert
money on one side and receive new users for your app on the
other. Now the reality is not that simple, but the mechanisms
METRIC DESCRIPTION
Impressions An ad being exposed/displayed
to a single user
Clicks A user clicking on an ad
Installs A user installing an app
Actions (Events) A user performing some kind of
action in your app
Selected Channels
The channels to reach qualitative new users for your mobile
app are ever-evolving (as is the way people use their
smartphones). Generally speaking, you can only reach users ef-
fectively in other apps where they spend a significant amount
of time. Obviously, those apps have to offer ad inventory so
that you can run your ads there. The four quintessential meta-
categories of channels for paid user acquisition are:
Paid Social
Advertising is the primary revenue stream for virtually any
of the social networks these days. Facebook, Twitter, Snapchat,
and many more will be happy to take your precious marketing
budget to run ads for your product. Because these platforms
6 searchads.apple.com
7 developers.google.com/adwords/api/docs/guides/mobile-app-campaigns
Tracking
To be able to run paid user acquisition campaigns that are
based on anything else than the mere amount of impressions
and clicks, you have to integrate additional tracking solutions
into your mobile app. The reason for this is that 3rd parties
(like Google or Facebook) have a tough time figuring out
whether an install of your app has happened after a click on
one of their ads without such additional tracking solution.
They can not fetch this information from the Google Play and
Apple App Store, meaning that in consequence, they can also
not sell you app installs (as they are unable to detect that
an install has happened). That is why it is no surprise that
the most basic install tracking solutions come from someone
that has a natural interest in enabling the measurement of
app installs and user behavior based events for your app - the
advertising platforms themselves. Facebook and many of
the more significant advertising platforms offer their own
proprietary tracking solutions so that you can run advertising
campaigns on their platforms. The two biggest problems with
these: They only work for measuring campaign results on the
advertising platform that is handing them out (creating a
similar situation like you have on web where every advertising
partner forces you to integrate a proprietary tracking pixel on
your website to run campaigns with them) and secondly, it is
just not advisable to receive the measurement of the campaign
results from the same party that is selling you the traffic.
Instead, it is recommended to integrate a 3rd party install
attribution provider (they call themselves MMPs - Mobile
Measurement Partners) that can independently attribute new
app installs to the source (e.g., your marketing campaign on a
268
Owned Media
While all the paid marketing activities for user acquisition
described in this chapter so far might seem attractive to you,
they all have one major drawback: They cost money (typically
a scarce resource if you are just starting out with your mobile
business). That is why we will now speak about a kind of
placement that is not costing you any money - your very own
ad inventory.
If you have a website or some other kind of online presence
that goes along your mobile application, chances are that
you have unused potential to convert some of the users that
visit your website/blog/social media page to actual app users.
As paid marketing has become the norm and cure for every-
thing, the potentials of owned media placements are often
disregarded. The general idea behind all the placements listed
below is to show the visitor that you have a mobile app that is
compatible with his device and that he or she should certainly
try it out.
Example Placements
Possible options for placements in your online presences are
numerous and depend heavily on the kind of service or product
you offer. The three most effective and most universal ones
are:
Smart Banner
Both Android and iOS offer standard versions of the smart
banner, which hovers on top of your website and for visi-
tors using a smartphone leading directly to your app's store
entry. If you use a tracking provider (MMP) in your app, it is
advisable to create a custom smart banner and put a tracking
link behind it, so that you can measure how many installs you
generate from it (+ some extra information).
App Store/Play Store Badges
It is advisable to put the official Apple/Google app store
badges (standardized buttons opening your app's store entry)
somewhere at the bottom of your website if your app relates to
the content of the website. Doing so gives your users another
option to get your app and shows that you have one in the
first place.
— developer.apple.com/app-store/marketing/guidelines
— play.google.com/intl/en_us/badges
QR Code
For website visitors using a regular
computer, it is helpful also to include a
QR-code to the App Store/Play Store so
that they can take out their smartphone
and scan the code, instead of having
to look for your app on the stores. If
you use an install attribution provider
(MMP), this exercise becomes a bit
easier because they all offer tracking
links that can determine the correct app store (Android/iOS)
for the user to be redirected to based on the user's device.
Retargeting
Acquiring new users for your mobile app is only half of the
story (actually less than that). In order to establish any
sustainable app business, you need loyal customers that come
back to your app over and over again. All the precious installs
you can buy with marketing money will not take you anywhere,
if none of these paid users show any activity after the install
(which is often the case with low quality mobile traffic). The
technical expression for users becoming inactive, is user churn
- if you start reading more about this, you will most certainly
come across the term in a lot of publications as the problem is
describes as somewhat trending these days (and even more so
the available countermeasures at hand).
100%
80%
60%
40%
20%
0
1 3 7 14 30 60 90
Days since App Install
8 "New data shows losing 80% of mobile users is normal, and why the best
apps do better", bit.ly/2AjOvMS
9 remerge.io
Paid Retargeting
The character of paid retargeting in itself is similar to paid
user acquisition, only for users that already have (or have
had) your mobile application installed on their device. The
main goal is to raise additional awareness for your app by
displaying ads to existing users in order to get them back into
your app. Thanks to so-called deep-links, the user experience
can be designed pretty smoothly. For example, you can decide
to take users right back into your app, after clicking on the
ad (vs. having them to go through the app store again).
Typically you would only target users that are not living up to
your particular definition of a loyal customer with this kind of
campaign and then try to convince those people to give your
product another go. The obvious downside is that you have
to pay someone a good amount of marketing money again to
go out, find the users that already have your app while they
browse other apps and websites (utilizing so-called user lists
with device identifiers of the users you already know), buy an
ad impression from this specific app publisher and eventually
display a banner or some video to the user you are retargeting.
All of this has to happen in a staggeringly short period of time
— Clicks
— Actions (Events)
Tracking
Having an MMP in place is even more critical for retarget-
ing campaigns than it is for user acquisition campaigns. It
is downright impossible to run any retargeting campaigns
without an MMP because you will lack the most quintessential
part of the retargeting campaign setup: The user list that the
retargeting provider needs to look for your existing users as
they use other apps and websites. This list is maintained by
your MMP (as the SDK runs in your app, capturing all your
current users).
Despite the user list, your MMP plays another vital role in
executing retargeting campaigns by measuring user events (ac-
tions your users perform in your app). One of these events will
most certainly be the goal of your retargeting campaign and
without your MMP tracking it in the first place and forwarding
that data to the retargeting provider you simply can not run
the campaign (i.e., the retargeting provider would refuse even
to start the campaign as there is no success criterium).
Deeplinking
From a user experience perspective, it is (very) advisable to
use deep-links when setting up any retargeting campaign. In
combination with the mechanics of the tracking link you get
from your MMP, this allows you to redirect the user right back
10 apple.co/2Ki9JAg
11 developer.android.com/training/app-links/deep-linking
279
Christian Eckhardt
Mobile Customer
Relationship Management
(mCRM)
BY
Generating new users for your mobile app is only one side of
the medal. If you set out to establish any kind of (successful)
long-term app business, you need to build a robust foundation
of loyal users that utilize your app continually and over a
prolonged period. After we have been looking at paid retarget-
ing activities (i.e., showing ads to existing app users of yours,
inside of other apps or websites) as a counteractive measure
in the last chapter, we will now move on to another popular
countermeasure to user churn: Mobile Customer Relationship
Management (mCRM)
Compared to paid retargeting, you can think of mCRM as the
owned media counterpart, so to speak. The general approach
in mCRM is to make use of communication channels that come
with your app (e.g., push notifications or in-app messages) or
are rather easy to get into such as e-mail, trying to convince
the user that he should come back to your app. In contrast to
paid retargeting where you have to pay for every ad impres-
sion that is served to a user, mCRM relies on channels that
typically do not incur any (or just minimal) incremental costs
per message sent (say push notifications). Generally speaking,
there are development resources (and hence costs) attached to
setting up a mCRM system in almost all cases though. Typical
content that you would deliver to your users as part of your
mCRM activities would be new product improvements, special
promotions, relevant external events (if applicable) or even
just a general introduction to some features that the customer
Communication Channels
There is a large variety of messaging channels that can be uti-
lized for mCRM activities, reaching from the usual suspects like
push notifications to corner cases like SMS (in most countries)
or even physical mailing. Depicting all of them would go way
beyond the scope of this chapter, meaning we will focus on the
most popular and most widely accepted ones for now.
It helps to look at the different messaging channels in a
matrix between urgency (how urgently do I want to have this
communication being delivered to my customers) and content
richness (how much content does the message contain). This
Push
Notifications E-Mail
Simple Rich
Content Content
In-App News Feed
Messages
Low
Urgency
1 braze.com
Push Notifications
Traditional push notifications are by far the most widely
adopted means amongst all the mCRM messaging types
whatsoever. Everyone that has ever used a smartphone (i.e.,
the majority of the population) is familiar with the little
notifications delivered directly to the home screen via the
operating system, and for most users, it is a bit of a love-hate
relationship these days. Marketers have realized pretty early
on, that push notifications are a very direct (and hence fairly
intimidating) way of communicating messages to their users,
despite both Apple and Google (in their respective developer
guidelines) explicitly prohibiting push notifications that
can unmistakably be identified as advertising or possess an
overly commercial character. Push notifications have been the
subject of ongoing debates in the past and what is socially
acceptable with your users, in particular, depends heavily on
the geography (e.g., push notifications with marketing content
are more accepted or at least tolerated in Latin America while
the acceptance threshold for most European users will be much
lower) as well as other factors like your app vertical.
If you manage to deliver relevant and helpful content to
your users that does not annoy them in their everyday life,
though, push notifications can be a highly potent communica-
tion tool between you and your users. This golden rule applies
to all messaging channels we are looking at here but push
notifications are clearly the type of message that is the most
E-Mail
Measured by opens, the overall e-mail messaging channel
is dominated by mobile devices today. Depending on which
figures you look at, the point at which more e-mails were
opened on mobile devices than on desktop computers has
2 "Mobile is now preferred platform for reading email with more than half of
all email opens", bit.ly/2GZTma9
3 twilio.com
Campaigns
All activities in the mCRM realm follow the same logical
structure. You will always have a campaign that is being sent
to a particular group of users (the user segment). A campaign
can consist of different messages and can make use of differ-
ent messaging channels (like push notification and e-mail) at
the same time.
For every campaign to be sent, you need to define a user
segment and at least one message to be contained in the
campaign. What you want to receive once the campaign is
completed (i.e., after the messages were sent) is the campaign
performance data, showing you the results of your campaign.
Data that you would expect to be included in this would be
clicks on the push notification (if applicable), push notifica-
tions sent (if applicable), e-mail opens (if applicable), app
opens, as well as particular actions that the user takes in your
app after receiving the message (which you defined upfront as
the goal of your campaign). While you can theoretically run
mCRM campaigns without this campaign performance data,
there is not much of a point in doing so, as it would be a
complete stab in the dark with no way of optimizing anything,
really.
In the next subchapters, we will take a closer look at all the
components of mCRM activities mentioned above.
Campaign Triggering
The campaign trigger, as the name already implies, is the
actuator for your campaign to start sending the messages. The
more ordinary campaign triggers evolve around time with the
utmost basic trigger being the exact moment when you hit
the "launch campaign" button. More sophisticated triggers are
based on different events to happen, and they can also carry
a delay if required (e.g., "send the user the onboarding push
notification 2 hours after he first opened the app" or "remind
the user of the item in his basket if he does not proceed to
checkout within 30 minutes after adding it to the cart"). The
information that you want to base your triggers on has to be
tracked/captured for each user first though (typically via the
event tracking capabilities of your mCRM vendor).
Automation
As we have learned above, there are many moving parts in-
volved in creating a sophisticated mCRM setup to enhance the
experience of your app users. With all the mechanics, technical
infrastructure, logical operators, tracking data and rule engines
needed to run mCRM campaigns at scale, it is important to
stress again that virtually any company that wants to be
successful with their mCRM efforts, ends up using one of the
established SaaS vendors in the space sooner or later. These
tool vendors handle user segmentation, message delivery,
(user) data capturing, campaign triggering, and reporting for
you and all come with some sort of web-based GUI. It is no
surprise that the development efforts that went into their solu-
tions are far away from something that you might be able to
43,000 entered
Send push
“Welcome Push“
0 current / 43k done
Has received
push notification?
YES NO
0 current
Send email “Welcome
Wait for 24 hours
Email with App“
0 current / 40k done 0 current / 3k done
Stop journey
0.5k exited
— Braze.com
— CleverTap.com
— Leanplum.com
— MoEngage.com
4 moengage.com/flows
295
Linda Harnisch
Defining Goals
Without hard data, app publishers and developers are left
flying blind. Or they fall prey to arbitrary feature development
sourced from their intuition or eager managers. Analytics data
provides a base from which different app business units can
actually strategize. This is powerful for marketers and develop-
ers alike and enables them to create an app experience that
is more useful and engaging for their users. For instance, if
an e-commerce app publisher discovers that a big amount of
their users drops out in the shipment screen, there must be a
technical problem or an issue with the user interface.
Before you immerse yourself in the mobile analytics world,
it is worth understanding how to set the stage for your analyt-
ics strategy. This should be rooted in your Key Performance
Indicators (KPIs) and the business value you hope to derive
from the app.
Unless you are developing your app in a small start-up,
4 braze.com/blog/essential-mobile-app-metrics-formulas
App-Performance Analytics
App performance analytics provide answers to questions such
as:
Marketing Analytics
Marketing analytics provide answers to questions such as:
— Installs
— Retention (this could be weekly, monthly or after day 1,
day 7 and day 30)
— Store Pageviews
— DAU/WAU/MAU
— Stickiness
— Activation rate
— Conversion rates from Google Play and Apple App Store
306
Choosing an Analytics Data Source
In order for your mobile app to succeed, there are numerous
metrics you need to be measuring and analyzing. This means
you will need to find a source to actually get your data from.
After setting up KPIs and supporting metrics you need to
define your sources:
8 developer.apple.com/app-store-connect
9 developer.android.com/distribute/console
10 firebase.google.com
Attribution/Marketing Analytics:
— Adjust.com
— AppsFlyer.com
— branch.io
— Kochava.com
Product Analytics:
— firebase.google.com
— Amplitude.com
— Mixpanel.com
— Count.ly
What to Consider?
If you want to avoid common mistakes, there are a wide range
of topics to consider when implementing and integrating
mobile analytics in mobile apps. The following are some of the
most critical:
Having enough users/traffic: You need enough data to
make qualified decisions. If your app just launched and you
have not tested your channels yet, you need to nail user
acquisition first before starting with mobile app retention and
analytics to feed your retention campaign.
Asking the right questions: You have to ask the right
questions from the start and focus on key metrics that are of
importance to your department (marketing, product manage-
ment, development, management). You need to know how to
link business results with the factors that drive those results,
know what metrics to track and finally, know what value you
want to get out of them.
Ignoring vanity metrics: These are metrics that are
irrelevant and do not act as an indicator of the success of your
mobile app business (e.g. app downloads, social media follow-
13 adjust.com/forget-device/
14 en.wikipedia.org/wiki/Percent-encoding
The Publishers
Open-Xchange
Open-Xchange is a developer of open source communication,
collaboration, office productivity, and DNS-based security
software and services. With 270+ employees and a global
presence Open-Xchange is well positioned to meet the needs
of our large Internet Service Provider, Hosting, Telecommunica-
tion and Cable Provider audience. Customers include 1&1,
Orange, Italiaonline, Comcast, GoDaddy, and Softbank, with
more than 200 million users already using our products. The
core of the product portfolio is OX App Suite with applications
for email, contacts, and appointments. OX App Suite can be
expanded to include additional apps such as: OX Drive for
managing and synchronizing files, OX Documents for text
editing, spreadsheets and presentations and OX Guard for email
Customlytics
Customlytics is a Berlin based app marketing consulting
agency. We enable apps to grow successfully by establishing
solid marketing analytics & technology infrastructure. To do so
we offer hands-on support as well as strategic guidance in the
fields of mobile marketing, product management, analytics &
technology integration.
Marketing & Technology: We speak both and act as a
mediator between marketing, product and development teams.
This enables our clients to successfully manage their own app
marketing efforts in the long run.
www.customlytics.com
customlytics.com/en/blog
The Authors & Supporters
This project would not have been possible with the ongoing
support from the mobile community. These are the folks that
have been involved as authors this time. Some of them are on
board for 10 years already, others just recently joined. All are
awesome.
Workshops Deeplinking
Ad Design UX & UI
customlytics.com
[email protected]
Please follow us on
Twitter @MobileDevGuide.
Thank you!
www.open-xchange.com
www.customlytics.com
„This guide is awesome. Chapters are perfectly suited for College-level computer
science student with just enough technical details to understand the scope of the
subject. Also, the edits and additions to the content from year to year make it
worth reading every new edition.“
- James Hoffman, Teacher at Collège Shawinigan Quebec
“A spectacular piece of work! You will be astonished by how incredibly fast you
can establish your presence in the mobile market with the simple steps explained
in this guide.“
- Daniel Hudson on webtechman.com
www.mobiledevelopersguide.com