Quick Relief for Acute Anxiety Through Assisted Deep Breathing

Calmly: Quick Relief for Acute Anxiety
Through Assisted Deep Breathing
by
CHRISTOFFER REHN
with the supervision of
DR BIJAN PARSIA
A report submitted for the degree of
Bachelor of Computer Science
in the
Department of Computer Science
University of Manchester
May 2016
0
Abstract
Stress is familiar to everyone. It is a problem of the modern world and a significant
concern for many. Although it is not necessarily a bad thing, too much stress can
have a tremendous negative effect on one’s life. It is then no surprise that a
substantial amount of research has been done on stress and relaxation techniques.
Many stress-relief apps exist, but only a few focus on deep breathing, or slow,
controlled breathing. This report explores stress and its related concepts, and
discusses the development process of an app that aims to provide quick relief of stress
symptoms through assisted deep breathing. It is an effort to address the lack of
effective, functional and appealing apps that focus on breath control for rapid
relaxation.
1
Acknowledgments
I would like to thank my supervisor Dr Bijan Parsia for his support, guidance and
invaluable advice throughout the project. I would also like to thank my friends and
the generous beta testers for their feedback and suggestions.
2
Table of Contents
Abstract .................................................................................................................... 1
Acknowledgments ..................................................................................................... 2
Chapter 1. Introduction ........................................................................................ 4
Chapter 2. Background ......................................................................................... 4
2.1. Stress, Anxiety and Panic Attacks ............................................................. 4
2.2. Effects of Stress and Anxiety ..................................................................... 5
2.3. Treatments ................................................................................................. 6
2.4. Deep Breathing .......................................................................................... 6
2.5. Existing Apps ............................................................................................. 8
Chapter 3. Design ............................................................................................... 11
3.1. Requirements............................................................................................ 11
3.2. App Overview .......................................................................................... 12
3.1. System Design .......................................................................................... 14
3.2. User Experience Design ............................................................................ 14
3.2.1. Early Builds ...................................................................................... 14
3.2.2. Milestone 1 ........................................................................................ 15
3.2.3. Milestone 2 ........................................................................................ 16
3.2.4. Milestone 3 ........................................................................................ 17
3.3. User Interface Design ............................................................................... 17
3.3.1. Overall Aesthetic............................................................................... 18
3.3.2. App Icon ........................................................................................... 18
Chapter 4. Implementation ................................................................................. 19
4.1. Development Methodology ....................................................................... 19
4.2. Statistics ................................................................................................... 20
4.3. Tools and Technologies ............................................................................ 21
4.4. Breathing Rate Detection ......................................................................... 21
Chapter 5. Testing and Evaluation ..................................................................... 22
5.1. Unit Testing ............................................................................................. 22
5.2. UI and Accessibility Testing .................................................................... 22
5.3. Beta Testing ............................................................................................. 23
5.4. Heuristic Evaluation ................................................................................. 23
5.5. Usability Evaluation ................................................................................. 23
Chapter 6. Reflection .......................................................................................... 24
6.1. Knowledge Gained.................................................................................... 24
6.2. Personal Motivation ................................................................................. 25
Chapter 7. Conclusion ......................................................................................... 25
References ............................................................................................................... 26
Appendix A. App Class Diagram ....................................................................... 29
Appendix B. Heuristic Evaluation Checklists ..................................................... 31
Appendix C. User Evaluation Tasks and Results ............................................... 34
3
Chapter 1. Introduction
Stress is familiar to everyone. It is a problem of the modern world and a significant
concern for many. Although it is not necessarily a bad thing, too much stress can
have a tremendous negative effect on one’s life. It is then no surprise that a
substantial amount of research has been done on stress and relaxation techniques.
Over the last decade, smartphones and their apps have become ubiquitous, and
are rapidly shaping how we live. Many solutions exist when it comes to stress-relief
apps, but only a few focus on deep breathing, or slow, controlled breathing. The apps
that do focus on respiration have a number of shortcomings described in Chapter 2.
This report discusses the development process of Calmly, an iOS app that aims
to provide quick relief of stress symptoms through assisted deep breathing. It is an
effort to address the lack of effective, functional and appealing apps that focus on
breath control for rapid relaxation.
Chapter 2. Background
This chapter explores stress, the concepts surrounding it, and the various treatments
available. It then examines existing stress-relief apps in order to rationalise the need
for Calmly.
2.1. Stress, Anxiety and Panic Attacks
The word stress forms a regular part of our vocabulary. Consider the following
statements:
• You wake up late and realise that you might not be on time for a very
important meeting.
• You are about to have an interview for a dream job.
• On your way home at night you notice a shady-looking character following
you.
• You realise that final exams are in less than two weeks, but you have not
even began preparing.
• Your partner suddenly stops responding to your text messages.
• You are about to move to another country for work.
In everyday use, all of those situations can be summed up by the word stress.
Despite its widespread use, defining the word stress has been particularly
difficult. It has been used in many contexts to refer to various related phenomena.
Although a number of definitions have been given (e.g., Basowitz, et al., 1955; Selye,
1956; Lazarus, 1966; Lazarus & Folkman, 1984; Cox, 1993), none have satisfied even
a majority of stress researchers (Elliott & Eisdorfer, 1982). Due to its inconsistent
use, it has been suggested that stress should be regarded as a “rubric consisting of
many variables and processes” (Lazarus & Folkman, 1984). Since the notion of stress
4
is often used to describe various physiological and psychological responses to stressors,
it leads to considerable overlap with concepts such as anxiety. For that reason,
Lazarus and Folkman (1984) suggest that quibbling over which term to use is
unnecessary. A popular definition by McGrath (1976) suggests that stress is “a
(perceived) substantial imbalance between demand and response capability, under
conditions where failure to meet demand has important (perceived) consequences.”
For the purpose of this report, such a definition will suffice.
Anxiety is an emotion characterised by feelings of worry, unease or fear
(American Psychological Association, n.d.). It encompasses a number of conditions
such as general anxiety disorder, panic disorder and social anxiety. It is often
measured in terms of state and trait anxiety. State anxiety refers to the anxiety one
is experiencing at any given time, and trait anxiety refers to an individual’s tendency
to feel anxious.
Extreme anxiety can lead to panic attacks, which are marked by intense fear,
heart palpitations, dizziness and sweating. Often, victims believe they are having a
heart attack (Bernstein, et al., 2008). The fear of experiencing panic attacks again
can lead to avoidance of certain places or situations; about a third of those suffering
from recurrent panic attacks develop agoraphobia (Anxiety and Depression
Association of America, 2016). People who experience anxiety disorders are also more
likely to display some other mental disorder, most often depression (Kaufman &
Charney, 2000; Roy-Byrne, et al., 2000).
Substantial resources have been devoted to the study of stress and anxiety, with
research interest remaining high (Jones & Bright, 2001). This can be attributed to
the fact that stress may result in intense and distressing experiences with large
influence on behaviour (Lazarus, 1966).
2.2. Effects of Stress and Anxiety
Stress triggers a number of changes that prepare the body when confronted with
demand. It is not necessarily a bad thing: it helps to stay alert, perform under
pressure, give strength and maximise chances of survival in threatening situations.
This is known as the fight-or-flight response. While occasional stress is normal,
overwhelming and prolonged stress can cause significant harm and affect all aspects
of one’s life.
Stress responses represent the feeling of being stressed. They can be can be
divided into three categories: physiological, psychological and behavioural responses
(Bernstein, et al., 2008):
• Physiological responses are the ways in which the body changes. These
changes include increased heart rate, rapid breathing, sweating, decreased
digestive activity, increased blood sugar levels and increased blood
pressure.
• Psychological responses are the cognitive and emotional changes that
occur. Examples of psychological changes are irritability, aggression,
5
•
concentration problems, indecision, nervousness, anger, sadness, guilt and
shame.
Behavioural responses include social withdrawal, attempting suicide,
substance abuse, increased smoking and avoidance behaviour.
A number of negative effects have been associated with stress. Stress leads to a
weakened immune system (Kiecolt-Glaser, et al., 2002; Cohen, et al., 1995), and is
associated with cardiovascular diseases and the development of mental health
disorders (Marin, et al., 2011; Cohen, et al., 2007). It also affects foetal development
(Kinsella & Monk, 2009) and is linked with lower life expectancy. Even low-level
stress increases the risk of heart attacks and strokes by 20% (Russ, et al., 2012).
However, stress is a highly individualistic experience. A recent study by Piazza, et
al. (2013) found that the way people respond to daily stressors is predictive of future
chronic health conditions. In other words, it is people’s reaction to stressors that
causes health issues. This means that there is no way to objectively predict the effects
of stress without knowing the person concerned.
2.3. Treatments
Various treatments for stress and anxiety are available. They can bring change
because feelings, thoughts and actions are interdependent: if one is changed, the rest
will probably change too (Lazarus & Folkman, 1984). Most interventions can be
divided into three categories: talking therapies, drugs and self-help techniques:
• Talking therapies focus on thoughts and behaviour in order to help identify
and challenge the negative thinking that contribute to anxiety.
• Drugs are prescribed for more severe cases. They work by elevating mood
or treating certain symptoms of stress and anxiety.
• Self-help techniques include exercise, adopting a healthy diet, time
management techniques, getting enough sleep and relaxation techniques.
This report is mainly concerned with one effective and time-proven relaxation
technique: deep breathing.
2.4. Deep Breathing
Deep breathing is also known as diaphragmatic breathing or abdominal breathing.
During this type of breathing, the diaphragm—a large muscle located at the base of
the lungs—contracts and the abdomen expands, allowing maximum oxygen transfer
to the blood.
Although all sources of stress cannot be avoided, it is possible to develop
healthier ways of responding to them. Out of all the automatic functions in the body,
respiration is the only one that can be controlled. Consciously altering breathing can
calm the nervous system and bring change to blood pressure, heart rate and digestion;
it acts as a bridge into bodily functions that cannot normally be controlled (Psych
6
Central, 2016). As a result, breath control can interrupt the fight-or-flight response
and provide quick relief for stress and anxiety.
Numerous benefits are associated with deep breathing. It reduces blood pressure
(Amandeep, et al., 2015; Mohamed, et al., 2013), improves autonomic functions (Pal,
et al., 2004), improves the respiratory system (Shaw & Shaw, 2011; Bernardi, et al.,
1998), improves sleep (Chien, et al., 2015), reduces anxiety levels, decreases the
frequency and intensity of panic attacks, and improves coping ability in stressful
situations (Han, et al., 1996). Even short durations of deep breathing have been
shown to be beneficial (Chinagudi, et al., 2014). Results show that the relief of
symptoms is mainly due to the decrease in respiratory rate (RR) (Han, et al., 1996).
Another significant aspect of respiration is the breathing pattern. It represents
the ratio between inhale, exhale and retention durations during a breath cycle.
Research has shown that it is also an important factor when it comes to feelings of
relaxation (Van Diest, et al., 2014). More specifically, rapid inhalation followed by
slow exhalation tends to be more effective for stress relief than equal or high inhaleto-exhale ratios (Van Diest, et al., 2014; Cappo & Holmes, 1984; Sharma, 2008). A
number of common breathing ratios exist, with roots mainly in yogic practices.
Common ratios include 1:1, 1:2, 3:4:7, 1:4:2 and 1:1:1:1 (e.g., Weil, n.d.; Sivananda,
1999; Becker-Phelps, 2013).
An important variable closely related to stress is heart rate variability (HRV).
As illustrated in Figure 1, HRV is the variation in the time interval between
consecutive heartbeats. Unlike heart rate (HR), HRV is not a measure of heart beats
per minute. Contrary to popular belief, the normal resting rhythm of the heart is
highly variable, instead of regular and monotonous. Generally, high variability is
associated with a healthy heart and low stress. On the other hand, low HRV
correlates with short-term and chronic stress (Schubert, et al., 2009), and has been
linked to anxiety, depression, post-traumatic stress disorder and schizophrenia
(Brosschot, et al., 2007). Interestingly, RR and HRV are inversely related (Song &
Lehrer, 2003). As a result, the practice of deep breathing can be used to achieve
benefits associated with high HRV (Chien, et al., 2015; Kulur, et al., 2009). Although
there are individual differences, variability has been shown to be maximal when
breathing at 4 to 6 breaths per minute (bpm) (e.g. Song & Lehrer, 2003; Lin, et al.,
2014).
Figure 1: Heart rate variability graph illustrating the variation in the intervals
between heartbeats (Polar, n.d.)
7
A fairly new method of stress-relief is HRV biofeedback. It uses electronic monitoring
of automatic bodily functions and involves training subjects to adjust their RR to a
frequency at which HRV is maximised. A recent review of studies concerning the
outcomes of HRV biofeedback showed very promising results for a number of medical
and emotional conditions: asthma, chronic obstructive pulmonary diseases, functional
gastrointestinal disorders, irritable bowel syndrome, cardiovascular diseases, high
blood pressure, gynaecological conditions, depression, anxiety and insomnia (Gevirtz,
2013). Another study that examined the efficiency of device-guided slow breathing
also reported considerable improvements for people with high blood pressure
(Viskoper, et al., 2003). Although the app described in this report does not yet
employ biofeedback techniques, it is reasonable to assume that similar results can be
achieved without HRV monitoring.
2.5. Existing Apps
In order to understand the requirements of an effective stress-relief app, it is
important to assess the strengths and weaknesses of currently available apps.
Analysing the potential competitors gives insight into where the app fits in the
overall market and allows responding with changes that offer better customer value.
The competitors consist of apps available on the App Store (Apple, 2016a) that focus
on deep breathing. Table 1 displays the competitor matrix that was used to compare
both objective and subjective factors (left and right of separator, respectively) of 15
competitors. The data for objective factors was retrieved from App Annie (App
Annie, 2016) and Mobile Action (Mobile Action, 2016) on April 22, 2016, and is
based on the United States App Store statistics. Apps with no reviews were not
included. The entries are ordered by visibility score, which is a metric provided by
Mobile Action that “indicates the app’s overall discoverability” and is based on
“keyword rankings, category rankings and review/rating performance” (Mobile
Action, 2016). As for the subjective factors, each app was scored based on price,
appearance and features (with weights of 0.25, 0.35 and 0.4, respectively). The
following 5-point Likert scale was used for scoring:
1. Major weakness
2. Minor weakness
3. Neither a strength nor a weakness
4. Minor strength
5. Major strength
The weighted sum of scores for each category was used as the total subjective score.
8
Here are the main observations of the apps in Table 1:
• Nearly all (87%) allow changing the session duration.
• Most (73%) include some sort of logging system.
• About half (47%) allow changing the individual inhale, hold and exhale
durations.
• About half (47%) allow changing the RR.
• Very few (7%) feature RR detection.
• Very few (7%) allow creating multiple breathing exercises.
• None allow independently changing the breathing pattern.
• Additional features offered usually include a combination of the following:
narrated meditation sessions, ambient sounds and mood tracking. One of
the apps features HR detection.
Furthermore, many apps tended to look old-fashioned, blurry and inconsistent.
Overall, the issue with existing apps is the lack of features, look of the UI and
impractical, overly verbose settings.
9
Table 1: Competitor matrix of deep breathing apps (April 22, 2016)
App
Price
IAP
iPhone
iPad
Apple
Watch
Latest
Update
Rating
(Count)
Visibility
Score
Price
(0.25)
Appearance
(0.35)
Features
(0.4)
Total
Pacifica - Anxiety, Stress, & Depression relief
based on CBT & Mindfulness
Free
04/2016
4.5 (716)
100
2
4
5
0.78
Relax Lite: Stress and Anxiety Relief
Free
03/2016
4.0 (58)
42
5
2
3
0.63
Breathing Zone
$3.99
03/2014
4.5 (428)
39
2
4
4
0.70
Mindfulness Daily
$1.99
09/2015
5.0 (860)
29
3
3
4
0.68
Breathe2Relax
Free
04/2016
4.5 (361)
27
5
1
4
0.64
Universal Breathing - Pranayama Free
Free
11/2014
4.0 (116)
27
5
1
4
0.64
3 Minute Mindfulness - Simple Breathing
Exercises
Free
04/2016
4.5 (68)
16
3
4
4
0.75
Universal Breathing - Pranayama
$4.99
11/2014
4.0 (85)
16
1
1
4
0.44
Relax - Stress and Anxiety Relief
$2.99
03/2016
4.0 (46)
15
2
2
3
0.48
Box Breathing
$2.99
08/2015
4.0 (13)
12
2
5
3
0.69
Essence — Breathing Relaxation
$1.99
04/2016
3.5 (41)
10
3
4
1
0.51
Breathe Well
Free
12/2015
4.5 (16)
3
5
2
3
0.63
ReachOut Breathe
Free
12/2015
4.5 (13)
2
5
4
4
0.85
Flowy
Free
11/2015
5.0 (7)
0
5
3
3
0.70
MyCalmBeat
Free
04/2015
3.0 (216)
0
5
1
3
0.56
10
Chapter 3. Design
This chapter discusses the requirements gathering process and overall app in terms of user
experience design, user interface design and system design.
3.1. Requirements
Development started with an unstructured exploratory stage in order to learn native iOS
development, familiarise with platform-specific conventions and experiment with various
prototypes. As such, only the most basic requirements were established early on. An app
definition statement is “a concise, concrete declaration of an app’s main purpose and its intended
audience” (Apple, 2016b). For this app, it was specified as the following: “Calmly is an app that
helps people to quickly reduce stress and anxiety through assisted deep breathing.” It is specific
enough to serve as a useful guide, but broad enough to allow flexible development. Since the
app’s main purpose is to alleviate symptoms of acute anxiety and panic attacks, the target
audience is mostly people who suffer from those conditions. However, as deep breathing offers
numerous health benefits, it should also accommodate the more general public. The core
features of the app were established using a set of usage scenarios, competitor analysis and
through face-to-face conversations with potential users. The app definition statement and user
scenarios were used as a guide whenever considering new features, terminology choices, and the
look and behaviour of the app. The two usage scenarios were written as follows:
John is extremely nervous about an upcoming interview. In order to calm down, he
takes out his iPhone and taps on the Calmly app. It then detects John’s breathing rate
and creates a personalised program that helps him breathe slower and deeper. He
breathes along the clear and soothing sounds that gradually slow down. As his
breathing rate decreases, he feels his body and mind calm down.
Jane frequently experiences panic attacks due to various social situations. During a
party, anxiety suddenly overwhelms her. The more she tries to control her anxiety, the
more she becomes aware of it, which only worsens the situation. She feels dizzy and
her heart rate increases. In order to try to cope with the situation and avoid a panic
attack, she quickly pulls out her phone and launches the Calmly app. The soft colours
and pleasant design instantly give her a certain feeling of comfort and trust. She
launches the breathing session and does her best to breathe along the instructions.
Within a minute she feels her body and mind calm down.
The following functional requirements were identified:
• Provide quick relief of stress symptoms by assisting the user to deep breathe.
• Detect user’s current RR in order to facilitate the transition towards a lower rate.
• Allow user to personalise the breathing exercises.
• Allow user to personalise the overall experience (e.g. colours, sounds).
The app should also possess a number of quality attributes in order to deliver an enjoyable
experience.
11
In terms of non-functional requirements, the app should be
• pleasant to look at;
• easy-to-use;
• accessible (e.g., support dynamic font size, be aware of colour blindness, make sure
accessibility metadata is correctly set);
• responsive;
• configurable;
• usable during the breathing exercise without having to look/listen.
3.2. App Overview
This section briefly presents the main screens and concepts of the app in order to facilitate
understanding in the following sections.
In Calmly, each breathing exercise is defined by a number of settings, such as breathing
pattern, session duration and icon colour. Although a standard set of exercises is provided,
breathing exercises can be added and edited at will. The default breathing exercises are based
on yogic practices, medical literature, and recommendations commonly found online (Weil, n.d.;
Sivananda, 1999; Becker-Phelps, 2013; Lin, et al., 2014; Van Diest, et al., 2014). The app
consists of the 17 screens illustrated in Figure 2.
Figure 2: App flow diagram
The Program screen is displayed when the app starts (unless it is the very first launch, in which
case an onboarding slideshow is shown). It shows the list of currently stored breathing exercises
(see Figure 3). Tapping on any of the exercises will either open the Detection screen (see Figure
4) or the Session screen (see Figure 5), depending on whether the exercise has RR detection
enabled. For instance, the Emergency Relief exercise skips RR detection to save time and
minimise obstructions to the user. During the breathing session, the user breathes along the
instructions. The breath cycle is represented as a segmented circle that fills up, where each
segment corresponds to either inhale, exhale or hold. The user can also control the session in
real time (see Figure 6).
12
Figure 3: Program screen; displays the
breathing exercises
Figure 4: Detection screen; detects user’s
breathing rate before the session starts
Figure 5: Session screen; the user breathes
along the instructions
Figure 6: Real-time control over the
breathing session; allows adjusting volume,
vibration and speed
13
3.1. System Design
The app consists of 30 classes organised in a model—view—controller (MVC) fashion. For the
app class diagram, see Appendix A. Each class is contained in a single file. For easy navigation,
files are structured in a way that reflect both the underlying MVC pattern and the app’s
hierarchical navigation style. The app uses standard iOS application programming interfaces
(API) and 4 third-party libraries that handle data storage, calendar control and some visual
effects.
The app stores the various breathing exercises, breathing patterns and statistics about
past sessions in a mobile database. Information about a past breathing session is stored in a
FinishedSession, which describes its duration, time period, whether RR detection was used,
whether the session was ended before completion and whether the user reported feeling better.
It also stores information about the breathing exercise that was used. A breathing exercise is
represented by a Program, which contains its breathing pattern, duration, target RR and
whether RR should be detected before the session starts. Since the user can select from a
number of breathing exercises, every Program also contains appearance attributes such as name,
icon and tint colour. The relationship between database objects is illustrated in Figure 7.
Figure 7: App database model
3.2. User Experience Design
User experience (UX) design is the process of improving usability and pleasure of interaction
between the user and the app. The app should meet user needs efficiently and in an enjoyable
way. Testing prototypes on physical devices helped to understand what types of interactions
are the most effective. Competitor analysis, user tests, and a deeper understanding of platformspecific conventions and design practices allowed the experience to be improved even further.
The app went through 4 major changes during development.
3.2.1. Early Builds
Early builds (see Figure 8) represent what was initially thought to be sufficient in terms of
functionality. They included RR detection, adjustable breathing pattern and adjustable session
duration. Not including adjustable target RR and extra configuration options was a deliberate
decision, due to concerns that terms such as bpm and too many choices might confuse the user
and make the app feel like a medical device. The target RR was set to a fixed 6 bpm, since it
is often cited in medical and yoga literature as optimal. The whole app consisted of 3 main
screens: detection, session and settings screen.
14
It was discovered that a fixed target RR wasn’t ideal since it doesn’t accommodate the wide
range of preferences, usage scenarios and individual differences.
Figure 8: Examples of early builds
3.2.2. Milestone 1
Milestone 1 builds added real-time control and adjustable target RR. It helps the user to regain
control when distracted or feeling uncomfortable. In order to disambiguate the term bpm from
“beats per minute”, the unit is displayed as bpm in constrained spaces and as “breaths per
minute” otherwise. A lot of different user interface (UI) designs and interaction styles were
experimented with. For instance, tapping on one of the bottom icons on the detection screen
(left on Figure 10) displayed a small pop-up window for changing the corresponding variable.
Dark-themed prototypes were also briefly tested (e.g. right on Figure 9), although they
discontinued due to being described as “depressing” and “gloomy” by many testers.
Milestone 1 builds replicated the UI by allowing the session settings to be changed both
on the detection screen and in the settings, which is obviously bad design. Another issue was
that the detection screen was displayed at launch and contained too many items, which led to
confusion and indecisiveness by the user.
15
Figure 9: Examples of milestone 1 builds
3.2.3. Milestone 2
Milestone 2 builds (see Figure 10) better separated different aspects of the app and added new
functionality. They included app-wide top and bottom navigation bars, providing a more
familiar UI and interaction style. A tab bar at the bottom also avoids having to extend fingers
when interacting with the app. In order to keep track of progress and past breathing sessions,
session history and general statistics were added. Milestone 2 builds also included features such
as custom sounds, daily notifications and vibration.
Figure 10: Examples of milestone 2 builds
16
Because of the confusion in milestone 1 builds over the detection screen, it was initially decided
that RR detection should be entirely optional. This however meant that a toggle for enabling
the feature would be necessary. Furthermore, it would lead to the notion of initial RR and
target RR, which could confuse the user even more. For these reasons, the RR detection feature
was removed altogether in order to improve other aspects of the app.
3.2.4. Milestone 3
There were two major issues with milestone 2 builds:
• The RR detection feature was removed since it was deemed not beneficial enough to
to justify an increase in UI and terminology complexity.
• There was no way to store multiple breathing exercises.
To address those issues, it was decided that all the settings of a breathing exercise would be
contained by a so-called breathing program, or just program. It allows the user to easily access
different breathing exercises, without the need to remember or adjust individual settings. It
also allowed removing the non-conventional “Start” button, and made it possible to add more
features unique to each breathing exercise without overcrowding the main screen. It keeps the
interface clean while providing ample customisation possibilities. Although milestone 3 builds
(see Figure 11) are the most recent, as shall be seen in the evaluation section, some aspects of
the app need to be further improved before release to the general public.
Figure 11: Examples of milestone 3 builds
3.3. User Interface Design
While UX design is mostly concerned with the usability and accessibility of the app, user
interface (UI) design is concerned with its look and feel. It is closely related to the more
traditional graphic design. For the end user, the UI is the application, hence focusing on it
early on should be paramount. It gives a feel and personality to the app, allows quick feedback
through user testing, can be fairly easily revised and serves as base for the app’s low-level design.
17
3.3.1. Overall Aesthetic
The app and its overall feeling should implicitly suggest trust, comfort and tranquillity without
appearing too cold and corporate nor childish and unprofessional. Therefore, a pleasant UI
layout and a sensible use of colours and shapes is necessary. On the one hand, an excessive use
of abbreviations, detailed statistics, cool colours (as opposed to warm ones), compact interfaces
and thin graphics might feel too technical and unwelcoming. On the other hand, too many
inconsistencies, custom UI elements, high saturation colours and superfluous effects can feel
overly amateurish and increase the user’s cognitive burden. Careful consideration of even the
smallest details give the app personality and make it recognisable. Just the act of seeing the
app should evoke an emotion, no matter how small or seemingly insignificant.
The app uses very few borders and no shadows, gradients or translucency. Shapes are
sharp, flat and of a single colour. Colours simplify the UI and convey depth. UI elements have
plenty of margin and negative space is embraced. These attributes give the app a certain feeling
openness and calmness.
Most in-app graphics and colours are based on Google’s material design resources. The
material icons (Google, 2016a) offer a wide range of pleasant, consistent and scalable designs.
Furthermore, new icons are frequently added and they’re provided in easy-to-use formats under
an open source license. The app’s colour scheme is based on low saturation material design
colours (Google, 2016b). The colours are vibrant and work well together. Although different
colour shades were experimented with, too many simultaneously visible high saturation colours
compete for attention and tend to look childish.
3.3.2. App Icon
A heart was chosen as the app’s symbol due to its simple shape, near-universal recognition and
strong association with emotions and the heartbeat. As shown in Figure 12, the app icon went
through a number of revisions. The first designs (top left on Figure 12) were based on a stylised
“C” referring to the app’s name. However, it felt cheap and forgettable. The following designs
were based on a smooth closed curve, vaguely resembling the outline of a slanted heart. Despite
testing different styles, the designs were discontinued due to close similarity with the Airbnb
logo (Airbnb, 2016).
Figure 12: Progression of app icon designs
18
The icon was then changed to a heart-based design built from basic geometric shapes, as
illustrated in Figure 13. Although its geometric simplicity was attractive, the resulting shape
felt too brusque in its curves.
Figure 13: Geometry of earlier heart-based app icon designs
In order to have a more consistent design across the app, the icon was replaced by the heart
symbol provided in the material icons collection. Various shadow effects, gradient styles and
border widths were experimented with, but they were left out in favour of a single vibrant
colour that blends with the content without the need for additional visual cues. Perhaps
surprisingly, the latest design (bottom right on Figure 12) is also the simplest.
Chapter 4. Implementation
This chapter addresses the project’s development methodology, discusses the tools and
technologies used for creating the app, and describes the breathing rate detection algorithm.
4.1. Development Methodology
The project started with an exploratory stage in order to gain experience with native iOS
development and better understand the project scope. Therefore, development was largely
adaptive. The app was designed, implemented and tested incrementally. It evolved through
continuous improvements, face-to-face conversations and frequent tests with potential users. A
Kanban board was used during the first half of the project to keep track of the various tasks
(see Figure 14). Halfway through, its use was discontinued in favour of a simple issue tracking
system.
19
Figure 14: Kanban board used to track project progress (December 18, 2015)
4.2. Statistics
All activities relating to the project were logged from October 2015 to March 2016, with each
entry containing the date, time period and type of work done. During the 5-month period from
October 20, 2015 to March 20, 2016,
• a total of 347 hours were spent working on the project (slightly over 17 hours per
week);
• of which 119 hours (34%) were spent on system, UX and UI design;
• and 228 hours (66%) on coding.
The week-by-week change in effort is shown in Figure 15. There was a progressive increase in
hours spent on the project, with peaks during the Christmas period and the weeks leading to
the project deadline.
Code
Design
40
35
30
Hours
25
20
15
10
5
0
1
3
5
7
9
11
13
15
17
19
21
Week
Figure 15: Weekly hours spent working on the project (October 20, 2015—March 20, 2016)
20
As can be seen in Figure 16, no changes were committed to the project repository during the
first 5 weeks, which corresponds to the aforementioned exploratory stage. There is only limited
correlation between the hours spent on the project and the number of commits.
30
25
Commits
20
15
10
5
0
1
3
5
7
9
11
13
15
17
19
21
Week
Figure 16: Weekly commits (October 20, 2015—March 20, 2016)
4.3. Tools and Technologies
In order to develop apps for Apple devices, the Xcode integrated development environment
(IDE) (Apple, 2016c) has be used. The app is written in the fairly new Swift programming
language (Apple, 2016d). Since the app uses a few third-party libraries, the CocoaPods
dependency manager (CocoaPods, 2016) was used to install and update libraries with ease. Git
version control system (Git, 2016) was used to keep track of code changes. The app repository
was hosted on Bitbucket (Bitbucket, 2016), since it allows the creation of private repositories
for free. As for the app assets, sounds were created with GarageBand (Apple, 2016d),
Pixelmator (Pixelmator, 2016) was used for editing raster graphics, and Affinity Designer (Serif,
2016) was used for editing vector graphics.
Storing session statistics and the breathing exercises required some way of achieving
data persistence. Two technologies were considered: Core Data (Apple, 2016e) and Realm
(Realm, 2016). Core Data is a mature persistence framework with a very wide set of features.
However, it has a steep learning curve and is only supported on iOS and OS X. Realm is a
cross-platform mobile database. It is fast, straightforward to set up, easy to use and facilitates
porting the app to Android in the future. For those reasons, Realm was chosen to handle the
data.
4.4. Breathing Rate Detection
The app features RR detection, which facilitates the transition from the user’s current rate to
a lower target RR. The user is asked to tap the screen at the beginning of each breath inhalation.
21
The RR is approximated from the time interval between three successive inhalations, and
adjusted to match the breathing ratio of the exercise. The steps are outlined below.
Let !" , !# , !$ be the timestamps recorded at three consecutive taps and !" < !# < !$ . The
breath cycle durations are then &" = !# − !" and &# = !$ − !# . For a meaningful RR
approximation, the breath durations &" and &# should be consistent. The values are consistent
if the relative error between them is below a certain threshold value ). That is, the values are
consistent if
&" − &#
≤ ).
(1)
&"
Through user testing, ) = 0.35 was found to be sensible. It ensures that the RR approximation
is reasonably precise while tolerating non-perfect timing. Since RR is the number of breaths
per minute, the approximated RR / is
120
/=
.
(2)
&" + &#
The result is rounded down to the nearest integer, since users had a tendency of slowing down
their breath even during detection. It is assumed that during detection the user breathes with
equal inhale and exhale duration. Therefore, it might feel uncomfortable if the inhale ratio of
the breathing exercise differs. For that reason, the detected RR is adjusted to match the
exercise’s breathing ratio. Let 34 be the inhale duration of a 1-second breath cycle. The adjusted
RR /5 is then
/5 = 2/34 .
(3)
Chapter 5. Testing and Evaluation
This chapter discusses the various types of software and usability testing methods used to assess
the app’s quality and correctness. Since the app will eventually be released to the general public,
ensuring robustness and usability is crucial.
5.1. Unit Testing
Unit tests were written for all classes that could be instantiated without the app’s UI, covering
about half of the classes. The tests were created using the XCTest framework (Apple, 2016f)
due to its ease of use and integration with Xcode. In total 14 tests with 67 assertions were
written. The tests were run after implementation and before pushing significant changes to the
repository.
5.2. UI and Accessibility Testing
Automated UI tests were used to verify that the app behaves as expected in a real-world setting.
Xcode makes it possible to record interface actions for use in test code, which significantly
simplifies writing the tests. A total of 5 UI tests with 21 assertions were written, covering all
common interactions with the app.
One requirement for writing efficient UI tests is that the elements should be accessible. The
testing system interacts with the app through the metadata exposed by the accessibility
infrastructure. If the test framework is able to interact with the system, it is highly like that
22
the screen reader and other assistive technologies can too. Therefore, the UI tests also allowed
testing the app’s accessibility.
5.3. Beta Testing
At the time of writing, the app is being beta tested using Apple’s TestFlight (Apple, 2016g),
which allows easy deployment of beta builds to testers, with support for basic statistics and
easy feedback. It has so far allowed testing the app on devices that were not physically accessible
and uncovering bugs that could not be replicated using the iOS simulator. Invaluable help has
been received from testers concerning wording, bugs and suggestions.
5.4. Heuristic Evaluation
A short heuristic evaluation was undertaken to quickly identify problems in the UI. Although
conducting a heuristic evaluation as the sole developer might not be ideal, it does help to reflect
on what has been created and find any major usability flaws. For the full heuristics used for
evaluation, see Appendix A.
Three issues were found using Nielsen's usability heuristics (Nielsen, 1995): it is too easy
to accidentally end a breathing session, the difference between breathing exercises is not
explained, and the app contains no help section that informs about proper breathing technique
and its benefits.
Apple also provides a number of recommendations in its Human Interface Guidelines. It is
much more concerned with consistency, iOS technologies and the visual aspect of design. It was
used as a base for creating a heuristic checklist. No significant flaws were found.
5.5. Usability Evaluation
A short study involving 6 participants was held to evaluate the usability of the app. The study
recruited six students aged from 18 to 26 years (median age of 21.4 years) with no previous
history of panic attacks. Two of them experienced anxiety on a regular basis. The participants
were asked to perform a set of tasks (see Appendix C) and complete a questionnaire relating
to the app. An iPhone was connected to a computer, which recorded voice and interactions on
the device. Ethical approval was obtained for the study, and informed consent was obtained
from each participant.
The study proceeded as follows. First, the participants were given 1 minute to freely
interact with the app, after which they were asked about any first impressions and the app’s
purpose. The participants were then asked to perform 7 tasks covering all common interactions
with the app. Finally, the participants were asked to complete the System Usability Scale
(Brooke, 1996) and asked about any likes, dislikes and recommendations. The gathered data
was used to examine common impressions about the app, and to verify the number of mistakes
and time taken to complete the tasks. A mistake was defined as an unnecessary interaction
with the app that does not help towards completing the task. A mistake was only counted once
when moving through the navigation hierarchy (e.g., moving back to the initial screen after a
wrong tap counts as 1 mistake).
The participants liked the app’s cleanliness, colours and simplicity, and felt that it looks
“professional” and might “attract younger people”. By far the most mentioned negative aspect
23
was the app’s detection screen, which was considered “confusing”. The task involving RR
detection is also the task where the participants made the most mistakes. Another common
complaint was that the button to end a session could be easily confused as a button to hide the
real-time controls. Suggestions for improvement included having more clear indication of when
the session starts and automatically returning to the previous screen after a selection. The mean
SUS score was 78. Using the mapping of SUS scores to adjectives by Bangor, et al., (2009), the
app can be considered as having “good” usability, where a score of 68 is considered average.
During RR detection, participants had a tendency to keep a finger on the screen and let
the animation dictate their breathing pace. This obviously led to wrong readings and
abnormally long inhalations. The confusion might be due to the animation which essentially
associates inhalation length to progress along the circle. Overall, the tasks were completed
reasonably quickly and without many mistakes. Further work is required to eliminate confusing
aspects of the app.
Chapter 6. Reflection
This chapter discusses the knowledge gained through the project and explains the personal
motivation for creating the app.
6.1. Knowledge Gained
I have learned many things throughout this project.
First, it seems to be very difficult to reach a “final” design (in the visual sense). I can’t
even begin to count the number of times that a certain design seemed sensible and pleasant
one day, only to dislike it a few days later. Looking back at some earlier app icons and UI
designs makes me wonder why I ever thought they looked good. One thing that helps to break
this “tunnel vision” is time, the other one is people. I realised how valuable the input from other
people is, especially when working on a project alone for hours every single day.
Another important skill that I further developed during this project is the skill of being
able to thrive in an unstructured, non-optimal environment. I learned along the way and
incrementally built on top of previous code. With improved skills and experience, I was able to
pinpoint design flaws and code smells. Although on a number of occasions I felt the urge to
start from scratch, I persisted and spent a lot of time and effort on refactoring. It was a
conscious decision since real-life code can be messy and I cannot always expect to find
beautifully engineered systems.
I have also come to appreciate the complexity of good UX design. I spent long hours
thinking about the simplest of things. Fitting all of the features of an app in a way that is clear,
beautiful, consistent, informative, intuitive and functional can be extremely difficult. Creating
simple interfaces is surprisingly complex.
Perhaps the most obvious and practical skill that I learned was iOS development. There
is always much more to learn, but I feel confident in writing apps. I have learned through it
new concepts and practices for creating well-crafted software.
24
6.2. Personal Motivation
The idea for this app came from my years of struggle with acute anxiety. For some reason
unbeknown to me, I used to get extremely anxious in situations and places where it would be
inappropriate to suddenly leave, such as classrooms or public transport. It affected every aspect
of my life at the time. The more I experienced anxiety, the more I became aware of it. That
only made things worse since I was constantly on alert: just the anticipation of anxiety was
enough to trigger it. I knew that avoidance behaviour would do no good, hence I forced myself
into the situations I dreaded the most. It took a number of years before I realised that the only
thing that really worked for me was breathing slower. It was a life-changer: I have not
experienced such disabling anxiety for years.
Chapter 7. Conclusion
The project achieved much more than what was planned in terms of functionality. The resulting
app differs greatly from initial designs. Work on the project progressed at a steady pace without
many unexpected delays; the tendency to underestimate effort was anticipated. However,
original plans expected a watchOS app to be built during the project time frame, but due to
the primary focus on the iOS app and difficulty of access to an Apple Watch, it was postponed.
Some work remains to be done before the app is ready for the App Store. More
comprehensive statistics, mood tracking, and watchOS and Android versions are just some of
the planned additions. Furthermore, a landing page, social media presence and a rudimentary
marketing strategy is required for a successful launch.
Overall, this project has been a success, and will hopefully be of value to a number of
people.
25
References
Airbnb, 2016. Holiday Rentals, Homes, Apartments & Accommodation - Airbnb. [Online]
Available at: https://www.airbnb.co.uk/ [Accessed 28 April 2016].
Amandeep, K., Preksha, M. S. & Divya, S., 2015. Effectiveness of abdominal breathing exercise on
blood pressure among hypertensive patients. International Journal of Therapeutic Applications, Volume
24, pp. 39-49.
American Psychological Association, n.d.. Anxiety. [Online] Available at:
http://www.apa.org/topics/anxiety/ [Accessed 16 April 2016].
Anxiety and Depression Association of America, 2016. Panic Disorder & Agoraphobia. [Online]
Available at: http://www.adaa.org/understanding-anxiety/panic-disorder-agoraphobia/ [Accessed 19
April 2016].
App Annie, 2016. App Annie - The App Analytics and App Data Industry Standard. [Online]
Available at: https://www.appannie.com/ [Accessed 28 April 2016].
Apple, 2016a. App Store. [Online] Available at: https://www.apple.com/appstore/ [Accessed 30
April 2016].
Apple, 2016b. iOS Human Interface Guidelines. [Online] Available at:
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/
[Accessed 21 April 2016].
Apple, 2016c. Xcode - What's New. [Online] Available at: https://developer.apple.com/xcode/
[Accessed 29 April 2016].
Apple, 2016d. GarageBand for Mac – Apple (UK). [Online] Available at:
http://www.apple.com/uk/mac/garageband/ [Accessed 28 April 2016].
Apple, 2016d. Swift - Overview. [Online] Available at: https://developer.apple.com/swift/
Accessed 28 April 2016].
Apple, 2016e. Core Data Programming Guide. [Online] Available at:
https://developer.apple.com/library/watchos/documentation/Cocoa/Conceptual/CoreData/index.html
[Accessed 28 April 2016].
Apple, 2016f. About Testing with Xcode. [Online] Available at:
https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/testing_with_xco
de/chapters/01-introduction.html [Accessed 28 April 2016].
Apple, 2016g. TestFlight Beta Testing. [Online] Available at:
https://developer.apple.com/testflight/ [Accessed 28 April 2016].
Bangor, A., Kortum, P. & Miller, J., 2009. Determining what individual SUS scores mean: adding
an adjective rating scale. Journal of Usability Studies, 4(3), pp. 114-123.
Basowitz, H., Persky, H., Korchin, S. J. & Grinker, R. R., 1955. Anxiety and stress. New York:
McGraw-Hill.
Becker-Phelps, L., 2013. Stop Your Anxiety Now! | Psychology Today. [Online]
Available at: https://www.psychologytoday.com/blog/making-change/201305/stop-your-anxiety-now/
[Accessed 27 May 2016].
Bernardi, L. et al., 1998. Effect of breathing rate on oxygen saturation and exercise performance in
chronic heart failure. The Lancet, Volume 351, pp. 1308-1311.
Bernstein, D. A., Penner, L. A., Clarke-Stewart, A. & Roy, E. J., 2008. Psychology. 8th edition
ed. New York: Houghton Mifflin Company.
Bitbucket, 2016. Bitbucket — The Git solution for professional teams. [Online] Available at:
https://bitbucket.org/ [Accessed 28 April 2016].
Brooke, J., 1996. SUS - A quick and dirty usability scale. Usability Evaluation In Industry,
189(194), pp. 4-7.
Brosschot, J. F., Van Dijk, E. & Thayer, J. F., 2007. Daily worry is related to low heart rate
variability during waking and the subsequent nocturnal sleep period. International Journal of
Psychophysiology, Volume 63, pp. 39-47.
26
Cappo, B. M. & Holmes, D. S., 1984. The utility of prolonged respiratory exhalation for reducing
physiological and psychological arousal in non-threatening and threatening situations. Journal of
Psychosomatic Research, 28(4), pp. 265-273.
Chien, H.-C., Chung, Y.-C., Yeh, M.-L. & Lee, J.-F., 2015. Breathing exercise combined with
cognitive behavioural intervention improves sleep quality and heart rate variability in major depression.
Journal of Clinical Nursing, 24(21-22), pp. 3206-3214.
Chinagudi, S. et al., 2014. Assessment of cognitive levels after short duration of slow deep
breathing by Raven's Standard Progressive Matrices. International Journal of Medical Science and
Public Health, 3(7), pp. 842-844.
CocoaPods, 2016. CocoaPods. [Online] Available at: https://cocoapods.org/ [Accessed 28 April
2016].
Cohen, S. et al., 1995. State and trait negative affect as predictors of objective and subjective
symptoms of respiratory viral infections. Journal of Personality and Social Psychology, 68(1), pp. 159169.
Cohen, S., Janicki-Deverts, D. & Miller, G. E., 2007. Psychological stress and disease. JAMA, pp.
1685-1687.
Cox, T., 1993. Stress research and stress management: putting theory to work. Sudbury: HSE
Books.
Elliott, G. R. & Eisdorfer, C., 1982. Stress and human health: analysis and implications of
research. New York: Springer Publishing Company.
Gevirtz, R., 2013. The promise of heart rate variability biofeedback: evidence-based applications.
Biofeedback, 41(3), pp. 110-120.
Git, 2016. Git. [Online] Available at: https://git-scm.com/ [Accessed 28 April 2016].
Google, 2016a. Material icons - Google Design. [Online] Available at:
https://design.google.com/icons/ [Accessed 21 April 2016].
Google, 2016b. Color - Style - Google design guidelines. [Online] Available at:
https://www.google.com/design/spec/style/color.html [Accessed 25 April 2016].
Han, J. N. et al., 1996. Influence of breathing therapy on complaints, anxiety and breathing
pattern in patients with hyperventilation syndrome and anxiety disorders. Journal of Psychosomatic
Research, 41(5), pp. 481-493.
Jones, F. & Bright, J., 2001. Stress: myth, theory and research. Harlow: Prentice Hall.
Kaufman, J. & Charney, D., 2000. Comorbidity of mood and anxiety disorders. Depression and
Anxiety, 12(S1), pp. 69-76.
Kiecolt-Glaser, J. K., McGuire, L., Robles, T. F. & Glaser, R., 2002. Psychoneuroimmunology:
psychological influences on immune function and health. Journal of Consulting and Clinical Psychology,
70(3), pp. 537-547.
Kinsella, M. T. & Monk, C., 2009. Impact of maternal stress, depression, and anxiety on fetal
neurobehavioral development. Clinical Obstetrics & Gynecology, Volume 52, pp. 425-440.
Kulur, A. B., Haleagrahara, N., Adhikary, P. & Jeganathan, P. S., 2009. Effect of diaphragmatic
breathing on heart rate variability in ischemic heart disease with diabetes. Arquivos Brasileiros de
Cardiologia, 92(6), pp. 423-429.
Lazarus, R., 1966. Psychological stress and the coping process. New York: McGraw-Hill.
Lazarus, R. S. & Folkman, S., 1984. Stress, appraisal, and coping. New York: Springer Publishing
Company.
Lin, I. M., Tai, L. Y. & Fan, S. Y., 2014. Breathing at a rate of 5.5 breaths per minute with equal
inhalation-to-exhalation ratio increases heart rate variability. International Journal of Psychophysiology,
Volume 91, pp. 206-211.
Marin, M.-F.et al., 2011. Chronic stress, cognitive functioning and mental health. Neurobiology of
Learning and Memory, Volume 96, pp. 583-595.
McGrath, J. E., 1976. Stress and behavior in organizations. In: Handbook of Industrial and
Organizational Psychology. Chicago: Rand McNally.
27
Meuret, A. E., Wilhelm, F. H., Ritz, T. & Roth, W. T., 2003. Breathing training for treating
panic disorder: useful intervention or impediment?. Behavior Modification, 27(5), pp. 731-754.
Meuret, A. E., Wilhelm, F. H. & Roth, W. T., 2001. Respiratory biofeedback-assisted therapy in
panic disorder. Behavior Modification, 25(4), pp. 584-605.
Meuret, A. E., Wilhelm, F. H. & Roth, W. T., 2004. Respiratory feedback for treating panic
disorder. Journal of Clinical Psychology, 60(2), pp. 197-207.
Mobile Action, 2016. Mobile Action: App Store Optimization and App Marketing. [Online]
Available at: https://www.mobileaction.co/ [Accessed 28 April 2016].
Mohamed, L. A. E.-K., Hanafy, N. G. & El-Naby, A. G. A., 2013. Effect of slow deep breathing
exercise on blood pressure and heart rate among newly diagnosed patients with essential hypertension.
Journal of Education and Practice, 5(4), pp. 36-45.
Nielsen, J., 1995. 10 Usability Heuristics for User Interface Design: Article by Jakob Nielsen.
[Online] Available at: https://www.nngroup.com/articles/ten-usability-heuristics/ [Accessed 23 April
2016].
Pal, G. K., Velkumary, S. & Madanmohan, 2004. Effects of short-term practice of breathing
exercises on autonomic functions in normal human volunteers. Indian Journal of Medical Research,
Volume 120, pp. 115-121.
Piazza, J. R. et al., 2013. Affective reactivity to daily stressors and long-term risk of reporting a
chronic physical health condition. Annals of Behavioral Medicine, 45(1), pp. 110-120.
Pixelmator, 2016. Pixelmator. [Online] Available at: www.pixelmator.com/ [Accessed 28 April
2016].
Polar, n.d.. Heart Rate Variability (HRV) | Polar USA. [Online] Available at:
http://support.polar.com/us-en/support/Heart_Rate_Variability__HRV_/ [Accessed 23 April 2016].
Psych Central, 2016. Learning Deep Breathing | Psych Central. [Online] Available at:
http://psychcentral.com/lib/learning-deep-breathing/ [Accessed 22 April 2016].
Realm, 2016. Realm is a mobile database: a replacement for SQLite & Core Data. [Online]
Available at: https://realm.io/ [Accessed 28 April 2016].
Roy-Byrne, P. P. et al., 2000. Lifetime panic-depression comorbidity in the National Comorbidity
Survey. British Journal of Psychiatry, 176(3), pp. 229-235.
Russ, T. C. et al., 2012. Association between psychological distress and mortality: individual
participant pooled analysis of 10 prospective cohort studies. British Medical Journal, 345(e4933).
Schubert, C. et al., 2009. Effects of stress on heart rate complexity: a comparison between shortterm and chronic stress. Biological Psychology, 80(3), pp. 325-332.
Selye, H., 1956. The stress of life. New York: McGraw-Hill.
Serif, 2016. Affinity Designer. [Online] Available at: https://affinity.serif.com/ [Accessed 28 April
2016].
Sharma, V., 2008. Breathe Right! (Part 3): Diaphragmatic and Pursed Lip Breathing. [Online]
Available at: http://www.mindpub.com/art574.htm [Accessed 23 April 2016].
Shaw, B. S. & Shaw, I., 2011. Static standing posture and pulmonary function in moderatepersistent asthmatics following aerobic and diaphragmatic breathing training. Pakistan Journal of
Medical Sciences, 27(3), pp. 549-552.
Sivananda, S., 1999. The Science of Pranayama. [Online] Available at: http://www.yogaage.com/asanas/prana.html#_VPID_62 [Accessed 27 May 2016].
Song, H.-S. & Lehrer, P. M., 2003. The effects of specific respiratory rates on heart rate and heart
rate variability. Applied Psychophysiology and Biofeedback, 28(1), pp. 13-23.
Van Diest, I. et al., 2014. Inhalation/exhalation ratio modulates the effect of slow breathing on
heart rate variability and relaxation. Applied Psychophysiology and Biofeedback, 39(3), pp. 171-180.
Viskoper, R. et al., 2003. Nonpharmacologic treatment of resistant hypertensives by device-guided
slow breathing exercises. Americal Journal of Hypertension, 16(6), pp. 484-487.
Weil, A., n.d.. Three Breathing Exercises. [Online] Available at:
http://www.drweil.com/drw/u/ART00521/three-breathing-exercises.html [Accessed 27 April 2016].
28
Appendix A. App Class Diagram
The app’s class diagram is illustrated in Figure 17. Most classes override system-provided
superclass methods, and are left out for the sake of simplicity. Interactions with the Helper
class are also left out. Furthermore, only the public-facing methods are displayed.
29
Figure 17: App class diagram
30
Appendix B. Heuristic Evaluation Checklists
Table 2: Usability evaluation checklist based on Nielsen's 10 heuristics (Nielsen, 1995)
Heuristic
Satisfies
Visibility of system status
The system should always keep users
informed about what is going on, through
appropriate feedback within reasonable
time.
Match between system and the real
world
The system should speak the users'
language, with words, phrases and concepts
familiar to the user, rather than systemoriented terms. Follow real-world
conventions, making information appear in
a natural and logical order.
User control and freedom
Users often choose system functions by
mistake and will need a clearly marked
"emergency exit" to leave the unwanted
state without having to go through an
extended dialogue. Support undo and redo.
Consistency and standards
Users should not have to wonder whether
different words, situations, or actions mean
the same thing. Follow platform
conventions.
Error prevention
Even better than good error messages is a
careful design which prevents a problem
from occurring in the first place. Either
eliminate error-prone conditions or check for
them and present users with a confirmation
option before they commit to the action.
Recognition rather than recall
Minimize the user's memory load by making
objects, actions, and options visible. The
user should not have to remember
information from one part of the dialogue to
another. Instructions for use of the system
should be visible or easily retrievable
whenever appropriate.
Flexibility and efficiency of use
Accelerators -- unseen by the novice user -may often speed up the interaction for the
expert user such that the system can cater
to both inexperienced and experienced
users. Allow users to tailor frequent actions.
Aesthetic and minimalist design
Dialogues should not contain information
which is irrelevant or rarely needed. Every
extra unit of information in a dialogue
competes with the relevant units of
Partially
Satisfies
Does
Not
Satisfy
Comments
All views allow quitting by a
single tap. Undo and redo not
supported since it is not a
conventional feature in nontext-related apps.
Confirmation alert should be
displayed when exiting a
session.
Different breathing programs
could have a description of
what they consist of
(currently only shows
duration), rather than having
to edit the program to view
the parameters.
31
information and diminishes their relative
visibility.
Help users recognize, diagnose, and
recover from errors
Error messages should be expressed in plain
language (no codes), precisely indicate the
problem, and constructively suggest a
solution.
Help and documentation
Even though it is better if the system can
be used without documentation, it may be
necessary to provide help and
documentation. Any such information
should be easy to search, focused on the
user's task, list concrete steps to be carried
out, and not be too large.
Need description for breathing
programs, help for breathing
and information its benefits.
Table 3: Usability evaluation checklist based on recommendations in Apple's Human
Interface Guidelines (Apple, 2016b)
Recommendation
Satisfies
Take advantage of the whole screen
Reconsider visual indicators of physicality and realism
Use plenty of negative space
Let color simplify the UI
Ensure legibility by using the system font
Embrace borderless buttons
Maintain focus on the primary content in all environments
Avoid gratuitous changes in layout
Be straightforward if your app runs in only one orientation
Make it easy to focus on the main task by elevating important content or
functionality
Use visual weight and balance to show users the relative importance of
onscreen elements
Use alignment to ease scanning and communicate groupings or hierarchy
Make sure that users can understand primary content at its default size
Be prepared for changes in text size
As much as possible, avoid inconsistent appearances in your UI
Make it easy for people to interact with content and controls by giving each
interactive element ample spacing
As much as possible, avoid displaying a splash screen or other startup
experience
Avoid asking people to supply setup information
Give users only the information they need to get started
Use animation and interactivity to engage users and help them learn by doing
Make it easy to dismiss or skip the onboarding experience
Avoid asking users to rate your app too soon
In general, launch in the device’s current orientation
Provide a launch file
If possible, avoid requiring users to read a disclaimer or agree to an end-user
license agreement before they can do anything else
When your app restarts, restore its state so users can continue where they
left off
An iOS app never displays a Close or Quit option
Save user data as soon as possible and as often as reasonable
32
Does Not
Satisfy
Save the current state when stopping at the finest level of detail possible
Never quit an iOS app programmatically
If all app features are unavailable, display a screen that describes the
situation and suggests a correction
If only some app features are unavailable, display either a screen or an alert
when people try to use the feature
Users should always know where they are in your app and how to get to their
next destination
Use a navigation bar to give users an easy way to traverse a hierarchy of data
Use a tab bar to display several peer categories of content or functionality
Use a page control when each app screen represents an individual instance of
the same type of item or page
Keep modal tasks simple, short, and narrowly focused
Always provide an obvious and safe way to exit a modal task
Reserve alerts for delivering essential—and ideally actionable—information
Respect users’ preferences for receiving notifications
In a content area, add a button border or background only if necessary
Avoid associating different actions with the standard gestures
Avoid creating custom gestures that invoke the same actions as the standard
gestures
Avoid unnecessary alerts
Make it easy for users to make choices
Balance a request for input by giving users something useful in return
Add animation cautiously, especially in apps that don’t provide an immersive
experience
When appropriate, make custom animation consistent with built-in animation
Use animation consistently throughout your app
Incorporate a brand’s assets in a refined, unobtrusive way
Don’t take space away from the content people care about
If you create multiple custom colors, make sure they work well together
Pay attention to color contrast in different contexts
Be aware of color blindness
Consider choosing a key color to indicate interactivity and state
Avoid using the same color in both interactive and noninteractive elements
In most cases, don’t let color distract users
In general, use a single font throughout your app
Support the Retina display
Display photos and graphics in their original aspect ratio, and don’t scale
them greater than 100%
Don’t use images that replicate Apple products in your designs
Don't use Apple app icons, images, or screenshots in your designs
Use terminology that you’re sure your users understand
Use a tone that’s informal and friendly, but not too familiar
Think like a newspaper editor, and watch out for redundant or unnecessary
words
Give controls short labels or use well-understood icons
Take care to be accurate when describing dates
Follow the guidelines for every UI element
Don’t mix UI element styles from different versions of iOS
In general, avoid creating a custom UI element that performs a standard
action
Don’t use system-defined buttons and icons to mean something else
As much as possible, offer configuration options in the main UI
33
Appendix C. User Evaluation Tasks and Results
Task 1
Select the Emergency Relief Program and complete the breathing exercise.
Task 2
Select the Daily Calm Program and let the app detect your breathing rate.
Task 3
Now that you’re doing the breathing exercise, disable vibration and manually decrease the
current breathing rate. Once that’s done, quit the session.
Task 4
Enable daily reminders at 4:45 PM.
Task 5
Check out the total time you’ve spent doing breathing exercises with the app.
Task 6
Create a new Program that uses the 4:7:8 breathing pattern, is 5 minutes long and has a target
breathing rate of 3 breaths per minute. Also disable Detection, and pick a colour and icon that
you like. Finally, save the Program.
Task 7
Now change the icon of the Program that you just created.
Table 4: Average duration and mistake count for each task
Task
1
2
3
4
5
6
7
Duration (s)
Mistakes
126.6
0
30.6
1.8
23.6
0
35.8
3
9
0.6
50.8
0.2
17
1.2
34