1 Introduction

Depression and Anxiety are the most common mental disorders which are observed in adults and adolescents. In 2015, it is estimated that 16.1 million adults aged 18 or older in the United States had at least one depressive episode in the past year [1]. According to WHO 2016 fact sheet depression is one of the most common illness worldwide and it effects approximately 350 million people around globe [2]. These depressive disorders are usually associated with an anxiety disorder. Most of the Mental Health Organizations recommend Cognitive Behavior Therapy (CBT) as evidence based approach for the treatment and management of Depression and Anxiety. CBT usually involves a patient and therapist encounters at stipulated intervals, where the patient is required to answer certain questionnaires which asses the patient’s mental health status and the severity of the existing disorder. At its core, CBT helps an individual to identify negative thought patterns and replace them by positive ways of thinking [3]. Although there is effective treatment available, less than half of those affected by it have access to these therapies. The factors which restrict access to such kind of therapies are lack of resources and lack of availability of trained professionals [2].

mHealth has gained more importance with the rapid uptake and utilization of the smartphones, which are powerful and monitor the real-time data of the user [4, 5]. Many researchers have claimed that mHealth is a mechanism which can deliver more effective and more accessible mental health care [6, 7]. Since mobile phones have become an extension of individual’s behavior, researchers have shown that behavioral health, which can be considered closely related to mental health, can be greatly affected by the use of smartphones [8]. Smartphone devices run various software applications (mobile apps) which tap the hardware features of the phone and can provide the user with valuable information in a user-friendly format. When these apps are built with mHealth orientation, they can provide patient-specific and user-centered health information which is meaningful, accurate, relevant and up-to-date. By the use of mobile apps, caregivers are able to target the patient, based on their condition and response to treatment [9]. These apps can be built to address a specific area such as to monitor fitness, provide health information, monitor sleep patterns and provide guidance to users for smoking cessation, meeting fitness goals and so on.

With the widespread use of internet technology, the web-based CBT is modified to make use of interactive design, where the user/patient is provided with the series of activities and tasks to be done. By this means of therapy, a larger group of population can access the service without the need of qualified and trained professionals. The major problem associated with this type of care is that the user needs to have access to a computer and internet. Studies demonstrate that this method is effective in improving the knowledge and the prognosis of the mental disorders [10]. But, this method has some drawbacks, such as the poor user interface, no reminders provided by the CBT website to complete the tasks. The other drawback for this type of care delivery is that there is no monitoring of real time data and it relies only on the data entered by the user.

It is also estimated that there are about 6 billion mobile cellular service subscriptions around the globe [11], highlighting that mobile technology has deep and wide penetration in society. Recent research suggests that a user’s personality can be attributed to the way they use their mobile phone [12]. This opens an opportunity, where a mobile phone might be the perfect medium to deliver virtual CBT. Apart from delivering CBT, mobile devices can perform functions that can track a user’s mental status in real time.

CBT delivered as a smartphone application encompasses all the pitfalls present in the internet mode of delivery. CBT provided in the form of a mobile application has the capability to correlate the user data to the real-time data provided by the smartphone. This allows to monitor the user’s status in real time and provide apt information to the user. With the rapidly increasing use of smartphones, users are more reachable and the chances of user dropping out are very low, as it is possible to send notifications and catch the attention of the user to again use the system. Research evidence suggest that CBT delivered via mobile application can have clinically significant improvement in the disease outcomes for depression patients [13].

2 Materials and Methods

We created the MoodTrainer mobile application inspired from a CBT website called MoodGYM (https://moodgym.anu.edu.au). We do not have any association or relation to the MoodGYM website, and only use it as a conceptual base for the intervention that is developed through this mobile application. The effectiveness of MoodGYM for depression and anxiety symptoms in individuals suffering from depression has been demonstrated in several studies [14,15,16]. Twomey et al. evaluated the effectiveness of the MoodGYM and suggest that CBT delivered by MoodGYM is effective in alleviating the depression symptoms. But, they also highlights that the dropout rate in MoodGYM studies could be a problem [17]. Another systematic review of the computerized CBT delivery methods conducted by Kaltenthaler et al. also highlights that the dropout rates for the different computerized CBT delivery methods are quite high [18]. The high dropout rates for the computerized CBT delivery could be due to usability and accessibility. But a major drawback of the present method of CBT is that it is lacks accessibility features, is not mobile-first and users need to access the CBT using a computer.

To counter these drawbacks, we developed the MoodTrainer mobile app. We developed MoodTrainer with features to track user’s behavior in real time and provide timely suggestion for effective results. MoodTrainer tracks user location and asks for responses when they check into an isolated location, detected using Bluetooth beacons and location services. Previous research shows that loneliness can be a risk factor in depression, where loneliness can significantly impact the wellbeing of the individual [19]. With the help of the above-mentioned technologies MoodTrainer tracks the user’s movements and isolated behavior. Here, MoodTrainer provides suggestions and recommendations that improve user mood, such as playing their favorite songs or pre-selected motivational quotes.

We conducted a literature review of all the different mobile applications that work as a CBT intervention under depression. In the literature we found 12 papers that discussed use of mobile applications for CBT, out of which 9 papers were opinion or call for research related papers and 3 papers were related to design ideas. There was no research that was related to the implementation/deployment/evaluation of a mHealth app that worked as a virtual CBT. We also searched the Google play store and the Apple app store to search apps (using keywords: mood, depression, anxiety). We found 41 apps in Google play store and 32 apps on the Apple app store that were related to mood and mental health. Most apps were log books or diary about feelings and mood of the user. Few apps went one step forward and allowed relating the times and produce reports that could be shared with clinicians and other users. Only 3 apps – T2 Mood Tracker developed by the National Center for Telehealth & Technology, Cognitive Diary CBT Self-Help by Excel at Life and Pacifa by Pacifica Labs Inc. – were related to evidence-based practices around CBT and mental health research. Most of the other apps were simple user logs which did not use device sensors, reminder/alert systems or paths/challenges that are important for self-help transformation in individuals with depression and anxiety problems. This motivated us to develop the MoodTrainer mobile application that was to be evaluated using a Randomized Controlled Trial, among university students who suffer from depression and anxiety. In this paper, we present the user-interaction (UI) design, user-experience (UX) and feature set that was developed based on the literature findings for evidence-based CBT interventions.

Based on the literature review and use of all the similar applications, we created a requirements specification for each feature with very specific acceptance criteria for each feature. The modular design of the application allowed us to improve the application without affecting any UI element that was already developed and tested. The core UI elements like stylesheet, JavaScript libraries, color schemes were developed and tested at the first cycle of development. The interaction design and UX elements like when to notify, when to change screens, how to showcase progress or alert boxes were unique to each module or feature and these had to be prototyped to test if it made sense for user’s workflow and based on their mental state and condition. We used a rapid prototyping methodology to develop the mobile application. Instead of creating paper prototypes, wireframes and then live mockups, we developed the application using HTML pages and deployed them into the mobile devices for testing. Based on the feedback between the researchers, we improved the application through rapid cycles of prototyping, as shown in the Fig. 1.

Fig. 1.
figure 1

Rapid prototyping methodology (Color figure online)

The review process involved looking at the requirements document and reviewing if it meets the acceptance criteria. After the review process, we refined, sometimes even the acceptance criteria and started the cycle of development again. This process allowed us to complete development of the application in under 3 months by a single developer.

3 Results

MoodTrainer is a cross-platform, hybrid mobile application, which utilizes web technologies such as HTML, CSS and JavaScript. MoodTrainer is available on Android, iOS, Windows Phone 8.1/10, Blackberry 10, FirefoxOS, LG WebOS and FireOS platforms and we have performed extensive testing on three Android devices, one iOS and two Windows devices. All the three platforms have matured to a level now that there is very little to distinguish between native and hybrid mobile applications that work in an embedded browser view such as WebView for Android or WKWebView for iOS platform. On our testing, we did not notice any differences between native application UX and hybrid mobile UX for the forms, device APIs and notification messages on our application (Figs. 2 and 3).

Fig. 2.
figure 2

The location tracking feature of MoodTrainer.

Fig. 3.
figure 3

Modules present in the application for the user.

Various UI screen pages were developed for the application using HTML5. On some pages we utilized advanced HTML5 features such as local storage and geolocation for storing user data and accessing the user location. Local storage is mainly used to store the user responses to the various activities in the app. JQuery Mobile was used to design the UI of the application. Later all the HTML pages and their related JavaScript were imported into NetBeans which was used to create a cordova project. This project was emulated on to a virtual android device to test its functioning of the application. The APK of the above HTML pages was compiled using Apache Cordova and a build release was generated. The generated APK was installed on an android device to check the functionality of the application. The installed application was fast and responsive on different android platforms.

The training aspect of MoodTrainer is like the above listed CBT based intervention apps, which focus on recording data, providing a path for mental health progress and then evaluating and giving feedback to the user to improve their mental condition. We did this in an evidence-based way that has been evaluated for improvements in clinical outcomes. The following are some of the main innovations that make MoodTrainer unique compared to other CBT intervention apps.

MoodTrainer includes a feature which retrieves the user location using native device APIs every few minutes and displays the user location on a map. We utilize the Google maps API and use its mapping functionality to determine nearby locations. Based on user location, we are able to identify if the user is in a remote site, which is less crowded, a trait commonly seen in depressed individuals. When MoodTrainer is able to detect this, we show notifications to either play their favorite mood music that they responded to in the questionnaire or we ask them to go through the mood improvement and self-help questionnaires. In the future, we plan to build a feature where caregivers, clinicians, nurses or friends can be notified and help the user in such situations. MoodTrainer also tracks the user’s voice pitch based on the changes in the voice frequency during calls, to detect the user’s stress levels. The app observes voice pitch during the learning phase and later watches for changes. When the app detects changes in pitch, it sends a notification to assess user’s status. Based on the user’s response to this notification, we provide appropriate advice to the user. We also wanted to build a motion-sensing feature using the smartphone’s accelerometer to detect agitations, but it did not work as expected and had to be removed from the application. These features of MoodTrainer ensure that the user is continuously engaged with the application and help provide timely and appropriate suggestions. These real-time tracking features help MoodTrainer to provide appropriate responses to the user. Previous studies suggest that mobile application designed focused for depression did not utilize the mobile specific features to provide the user real-time feedback [20]. All of the geolocation, voice-based mood identification and external help features can be turned on or off through settings by the user, so that it does get too intrusive for the user. These innovative features make MoodTrainer unique in delivering CBT for depression. Apart from the above mobile-specific innovations, as a generalized CBT, MoodTrainer navigates the user through a step-by-step, series of modules that analyze the user’s level of depression and anxiety (Fig. 4).

Fig. 4.
figure 4

Represents different questionnaires to evaluate the level of depression and anxiety

The different modules present in the CBT application are:

  • Assessment Module

    The main motive of this module is to identify the severity of the depression and anxiety symptoms experienced by the users. The user is taken through a series of questionnaires using which the symptoms of the user are classified as mild, moderate and severe. The assessment module is the first module that should be answered by the user, so that assessment and progress path can be created for the user.

  • Feelings Module

    This module takes the user through a series of tasks which helps the users to identify their feelings and helps them in developing a positive feeling regarding themselves. The feature to associated different songs with different moods may also be done in this module. Depending on the responses in other modules, and assessment of the mood by the application, the associated song will be played.

  • Thoughts Module

    In this module user walks through a series of activities which aids the user in identifying their negative thoughts and later the user is presented with methods which aid in countering the negative thoughts with positive ones.

  • Unwarping Module

    This is one of the important module present in this application, the main focus of this module is identifying user’s warped thoughts and help them in coming out if the warped thinking.

  • Destressing Module

    The main goal of this module is to equip the user with the destressing strategies and also help the users in applying these strategies in real life scenarios.

  • Relationship Module

    This is the final module of the present application; this module mainly focuses on building relationships and suggests the user to look at the Brightside in a relation. This module also analyzes the user’s relation with their parents and helps them in having a better relation with their parents.

These modules utilize various scales such which help in assessing the users’ thoughts and their current mental state. They are:

  • Goldberg Depression and Anxiety scale

  • Wrapy Thoughts Quiz

  • Pleasant Event Schedule

  • Life Whacks Questionnaire

  • Measure of parenting Style

Additionally, these modules are equipped with scales that analyze warped thoughts experienced by the user. In advanced modules, the user is asked to perform series of activities that may help in overcoming the warped thoughts. All the above-mentioned modules and features of the application are flexible and the user can enable to disable these features, depending on their comfort level with the trainer. With the use of each module, the user can view their scores and validate their own progress. With these supportive care features, MoodTrainer fulfills the criteria for dynamic supportive psychotherapy. The corner stone of dynamic support therapy is to “be with the patient”, which mainly involves interacting with the patient and sharing experiences [21]. The user interaction and responses are logged for the purposes of a real psychologist for feedback.

4 Discussion

While CBT based interventions using mobile phones are not very common, we see that more and more psychologists prefer that their patients start using apps that log behavior and mood. This helps self-management, such as identifying factors that become triggers for mood change, and causes for depressive behavior. The MoodTrainer logs are not supposed to be used by clinicians, but primarily by researchers who want to evaluate the tool, patient activation and patient engagement with the application and how it affects patient outcomes. The secondary user of the logs is the patient. Yet, the more useful thing for the patient is decision support by the virtual CBT based on the questionnaire in the different modules.

The effectiveness of the innovative features in MoodTrainer cannot be commented on until we complete the RCT. But in terms of the ideas and implementation of technologies, we have been able to implement and showcase the useful sensors available in today’s smartphones. Being able to use pervasive computing in mental health is the first step towards a new model for CBT and for an all pervasive CBT intervention. While this CBT intervention can work on its own, the best possible use that we see in the foreseeable future is combining MoodTrainer with a telehealth program in mental health. The role of the caregivers and family members should not be dismissed, but this CBT intervention is only complementary to existing behavioral and pharmacological treatments that are available today.

The problem with testing the MoodTrainer application in an RCT is determining the confounding factors such as environmental, case severity and even limited by the way current practices surrounding modern mental health treatments. Unlike other fields of medicine, mental health diagnosis and treatment is quite varied across contexts and needs to be personalized to the patient’s mental condition. With a CBT and better ways of logging and decision support, there is a possibility that the personalization can be better targeted.

5 Conclusion

In conclusion, we present MoodTrainer as a self-efficacy tool and virtual CBT that is not meant to replace a clinical caregiver. Rather, it is a supportive tool that can be used to self-monitor, as well as a monitoring aid for clinicians. As there are resource challenges in continuous and direct delivery of CBT, we propose that mobile applications, such as ours, might be the best method for delivering CBT. Delivering CBT via mobile application is cost effective and can also be applied in low resource settings.