Short Communication
DOI: https://dx.doi.org/10.18203/issn.2454-2156.IntJSciRep20230716
Development of an android-based journaling and mood tracking mobile application for improving mental health using firebase application programming interface
Department of Informatics, Universitas Multimedia Nusantara, Tangerang, Indonesia
Received: 01 February 2023
Revised: 12 March 2023
Accepted: 13 March 2023
*Correspondence:
Dr. Alexander Waworuntu,
E-mail: alex.wawo@umn.ac.id
Copyright: © the author(s), publisher and licensee Medip Academy. This is an open-access article distributed under the terms of the Creative Commons Attribution Non-Commercial License, which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.
ABSTRACT
The mental health of an individual is a critical aspect of overall well-being and has a significant impact on daily life and relationships. Despite the increasing prevalence of mental health disorders, access to mental health care remains a challenge, especially in low and middle-income countries. The use of mobile apps has the potential to improve access to mental health care and promote self-awareness and well-being. The study aims to design a mental health application that incorporates journaling and mood tracking to promote mindfulness and encourage individuals to regularly reflect on their experiences and emotions. The application is built on the firebase platform and utilizes three key components: firebase storage, firestore database, and firebase authentication. The application also employs two native device features, camera and storage, for capturing profile pictures and cover images. The study provides a comprehensive solution for user management and the delivery of mental health support services.
Keywords: Android, Firebase, Mental health, Mobile application
INTRODUCTION
Mental health plays a crucial role in overall human well-being and has been linked to a range of life domains, such as work, relationships, and education.1 The maintenance of good mental health is essential for leading a fulfilling and productive life, and poor mental health has been found to have negative impacts on both individuals and society.2 Research has shown that addressing and promoting mental health can lead to improved quality of life, increased resilience, and reduced risk of mental health problems.3 Mental health has been found to be a key predictor of physical health outcomes, including cardiovascular disease, diabetes, and mortality.4 With the increasing recognition of the importance of mental health, there is a growing need to prioritize its promotion and protection to support overall human well-being.
Journaling and mood tracking have been found to have numerous positive effects on mental health and well-being.5 The act of journaling has been shown to promote self-reflection and emotional regulation, leading to improved mood and reduced symptoms of anxiety and depression.6 Mood tracking can provide individuals with valuable information about patterns and triggers in their emotional experiences, allowing for greater insight and control over their mental health.7 Furthermore, journaling and mood tracking have been found to be associated with improved coping skills and increased resilience in the face of stress and adversity.8 With the growing recognition of the benefits of journaling and mood tracking for mental health, these practices have the potential to play a valuable role in promoting and maintaining good mental well-being.9
The use of mobile phones and apps has become ubiquitous in modern society, with individuals spending an increasing amount of time on their devices.10 Research has shown that people use their mobile phones and apps for a wide range of activities, including communication, entertainment, information seeking, and social media usage.10,11 The widespread use of mobile phones and apps has been found to have both positive and negative effects on individuals and society, with evidence suggesting that excessive use can lead to negative impacts on mental health, such as anxiety and depression.12 However, the use of mobile phones and apps for health and wellness purposes, including mental health support, has been found to be on the rise.13,14 As mobile phones and apps play an increasingly important role in daily life, it is crucial to understand their effects and how they can be leveraged to support health and well-being.
Mobile apps have the potential to support mental health through various means, including journaling and mood tracking.15 Research has shown that journaling and mood tracking can be effective in promoting emotional regulation and self-reflection, leading to improved mental well-being.9 Mobile apps can provide individuals with an accessible and convenient platform for journaling and mood tracking, allowing for real-time monitoring and analysis of mental health symptoms.16 Furthermore, the use of mobile apps for journaling and mood tracking has been found to be associated with improved outcomes, such as reduced stress and anxiety.17 With the increasing recognition of the benefits of journaling and mood tracking for mental health, the use of mobile apps for these purposes has the potential to play a valuable role in supporting mental well-being.18
To address the current need for accessible and convenient mental health resources, this study aims to design and develop an Android-based mobile application that utilize Firebase API to support mental health through journaling and mood tracking. The app will allow users to record their thoughts, emotions, and experiences, and track their mood changes over time (Reference can be added as per requirement). The goal is to provide a convenient and accessible tool for individuals to promote their mental health and well-being, and to contribute to the growing body of research on the use of mobile technology for mental health support.
METHODS
The design of the application commences with a splash screen, which is followed by the presentation of the login screen for users who have not yet logged in. If the user does not possess an account, they must complete the registration process prior to accessing the application. Upon successful login, the home screen is displayed, providing the user with the option to engage in journaling and/or mood tracking, or to access the self-healing menu where they may participate in guided meditation utilizing calming sounds. Additionally, the user may view their profile within the application. Figure 1 displays the flow of the application.
The architecture of the Android-based mental health application utilizes the firebase platform, incorporating three key components: firebase storage, firestore database, and Firebase authentication. Firebase storage is a cloud-based service provided by firebase, which allows for the storage and retrieval of user-generated files, such as images and videos. The stored data can be accessed through the use of unique URLs generated by firebase Storage and can be used for serving website content, storing backups, or transferring data between servers. The data stored in firebase storage is organized into buckets, which can be created and managed through the firebase console. Security rules for controlling access to stored data can also be specified and enforced by firebase storage. Firebase storage is utilized for the storage of images, such as profile pictures and cover images, allowing for seamless integration with the application and efficient retrieval of the stored data.
Firestore database is a NoSQL document-oriented database provided by firebase, used for storing and retrieving data in real-time. It allows for the creation of collections, which contain documents, with fields to store data in a hierarchical structure. The data is stored in the cloud and synchronized in real-time, ensuring that data can be accessed from multiple devices. The database supports complex queries and transaction operations, making it a suitable choice for developing scalable applications. Access to the database is controlled through firebase Authentication, which provides a secure way to authenticate users and manage their access to data stored in firestore. Firestore database serves as the primary repository for user data, including journal/diary entries, mood tracking information, and user profiles. The data is organized in the form of collections and documents, providing a flexible and scalable structure for the storage of information.
Firebase authentication is a service provided by firebase that allows for the secure authentication of users. It enables the process of verifying the identity of an individual accessing an application, by providing a mechanism for sign-in and sign-up operations. The service can be used to authenticate users via email and password, phone number, or popular identity providers such as Google, Facebook, and Twitter. The authentication information is securely stored and managed by firebase, allowing developers to easily implement authentication in their applications without having to manage the security and storage of sensitive information. Firebase authentication is employed for user authentication, providing secure access to the application and ensuring that only authorized users are able to access the stored data. This component integrates with the Firestore database to provide a comprehensive solution for user management within the application. Overall, the integration of these three components within the architecture of the Android-based mental health application provides a robust and secure platform for the management of user data and the delivery of mental health support services.
The application employs two native device features, namely the camera and storage. The camera is utilized to capture images for the purpose of profile pictures and cover images. The user has the option to either directly utilize the camera to take the picture or to select a picture from their device's photo gallery. Code 1 is the Java code for taking picture that displays a dialog box for the user to choose between "Take photo", "Choose from gallery", and "Exit". When the user selects one of the options, the method performs the corresponding action: "Take photo" opens the device's camera to capture an image, "Choose from gallery" opens the device's photo gallery to select an image, and "Exit" dismisses the dialog box. The method takes a context argument, which is the context in which the dialog box is displayed. The method uses the androidx.appcompat.app.AlertDialog.Builder class to create the dialog box, and sets its options using the setItems method. The show method is then called to display the dialog box.
A collection-document hierarchy is used for storing data in Firestore, with the user's unique identifier (Uid) employed as the key for collection creation for diary and mood data tracking by creating a collection having the Uid as its name and storing diary and mood data in the documents within that collection. Code 2 is a sample code for the creation of the diary data collection and the addition of a diary entry.
RESULTS
The developed application has a minimum operating requirement of Android 7.1. The home user interface, depicted in Figure 5, enables users to indicate their current mood and create diary entries. The interface also features four tabs located at the bottom, including home, diary, self-healing, and profile.
In the diary activity (depicted in Figure 6), a list of diary entries is displayed using a Recycler View. RecyclerView is an Android widget used to efficiently display large data sets. It works by recycling and reusing the views that are no longer visible on the screen instead of creating new views for each item. This leads to a smoother and more efficient scrolling experience as well as reduced memory usage. The RecyclerView widget also allows for various customizations, such as adding animations, headers and footers, and implementing complex item interactions. The list includes the title of each entry and a portion of its content. A Floating Action Button is located at the bottom right, allowing the user to create a new diary entry.
DISCUSSION
A sample of 30 university students who had received previous counselling sessions with the university psychologist was selected through random sampling to participate in the evaluation of the developed mobile application. The evaluation was conducted using the usability, satisfaction, and engagement (USE) questionnaire.
In terms of usability, the results of the evaluation indicate that the participants had a clear understanding of the features and functions of the application. The navigation and layout of the application were also deemed to be easy to use and understand. Additionally, the participants reported a low number of errors when using the application, indicating that it was user-friendly and efficient. These findings suggest that the application has a high level of usability, making it accessible and efficient for users to accomplish their goals.
In terms of satisfaction, the results of the evaluation revealed that participants had a positive view of the application. The majority of the respondents indicated that they found the application easy to use, with helpful features that contributed to their overall enjoyment of the app. In addition to this, the respondents praised the visually appealing design of the application, stating that it made the user experience more pleasant. These results suggest that the application has been well received by its target audience and that users are satisfied with its functionality and design.
The Engagement aspect was found to be high among the respondents. The 30 university students selected from those who previously had consultation sessions with university psychologists, indicated that they would continue using the application in the future. The respondents noted that the application was well-suited to their needs and provided an effective way of tracking their diary entries and mood. The ease of use and helpful features, as well as the visually appealing design, were cited as reasons for high engagement with the app. These findings suggest that this application effectively promotes user engagement and provides a valuable tool for tracking one's mental well-being.
CONCLUSION
In conclusion, the development of the Android-based mobile application to support journaling and mood tracking was successfully carried out. The application employed Firebase Authentication for user authentication, Firestore for data storage, and Firebase storage for media file storage. The results of the evaluation conducted using the USE questionnaire revealed that the application exhibits high levels of usability, satisfaction, and engagement among the users. The positive feedback from the 30 university student respondents suggests that the application effectively fulfills its purpose in supporting users in monitoring their mood and diary entries. Additionally, this research highlights the potential of the application in contributing to mental health improvement through self-reflection and self-awareness. Overall, this study provides meaningful contributions to the field of mobile application development and mental health support.
ACKNOWLEDGEMENTS
The authors would like to thanks to Universitas Multimedia Nusantara and the software engineering lab of universitas multimedia Nusantara for their support and facilities provided during the research process. Their contributions have been invaluable to the success of this project.
Funding: No funding sources
Conflict of interest: None declared
Ethical approval: Not required
REFERENCES
- 1. Organization WH. World Mental Health Report: Transforming Mental Health for All. 2022. Available at: https://www.who.int/publications/i/item/9789240049338. Accessed on 12 January, 2023.
- 2. Dwyer P, Scullion L, Jones K, McNeill J, Stewart ABR. Work, welfare, and wellbeing: The impacts of welfare conditionality on people with mental health impairments in the UK. Soc Policy Adm. 2020;54(2):311-26.
- 3. Ungar M, Theron L. Resilience and mental health: how multisystemic processes contribute to positive outcomes. Lancet Psychiatr. 2020;7(5):441-8.
- 4. Correll CU, Solmi M, Veronese N. Prevalence, incidence and mortality from cardiovascular disease in patients with pooled and specific severe mental illness: a large-scale meta-analysis of 3,211,768 patients and 113,383,368 controls. World Psychiatr. 2017;16(2):163-80.
- 5. Suhr M, Risch AK, Wilz G. Maintaining Mental Health Through Positive Writing: Effects of a Resource Diary on Depression and Emotion Regulation. J Clin Psychol. 2017;73(12):1586-98.
- 6. Chigwedere C. Writing the ‘self’ into self-practice/self-reflection (SP/SR) in CBT: learning from autoethnography. Cogn Behav Ther. 2019;12:e38.
- 7. Murnane EL, Cosley D, Chang P. Self-monitoring practices, attitudes, and needs of individuals with bipolar disorder: implications for the design of technologies to manage mental health. J Am Med Informatics Assoc. 2016;23(3):477-84.
- 8. Khanna P, Singh K. Stress management training and gratitude journaling in the classroom: an initial investigation in Indian context. Curr Psychol. 2021;40(11):5737-48.
- 9. Wong YJ, Owen J, Gabana NT. Does gratitude writing improve the mental health of psychotherapy clients? Evidence from a randomized controlled trial. Psychother Res. 2018;28(2):192-202.
- 10. Andrews S, Ellis DA, Shaw H, Piwek L. Beyond Self-Report: Tools to Compare Estimated and Real-World Smartphone Use. Pietschnig J, ed. PLoS One. 2015;10(10):e0139004.
- 11. Christopher L, Waworuntu A. Java Programming Language Learning Application Based on Octalysis Gamification Framework. Int J New Media Technol. 2021;8(1):65-9.
- 12. Nayak JK. Relationship among smartphone usage, addiction, academic performance and the moderating role of gender: A study of higher education students in India. Comput Educ. 2018;123:164-73.
- 13. Nussbaum R, Kelly C, Quinby E, Mac A, Parmanto B, Dicianno BE. Systematic Review of Mobile Health Applications in Rehabilitation. Arch Phys Med Rehabil. 2019;100(1):115-127.
- 14. Utomo P, Kurniasari F, Purnamaningsih P. The Effects of Performance Expectancy, Effort Expectancy, Facilitating Condition, and Habit on Behavior Intention in Using Mobile Healthcare Application. Int J Community Serv Engagem. 2021;2(4):183-197.
- 15. Bakker D, Rickard N. Engagement in mobile phone app for self-monitoring of emotional wellbeing predicts changes in mental health: MoodPrism. J Affect Disord. 2018;227:432-442.
- 16. Schueller SM, Neary M, Lai J, Epstein DA. Understanding People’s Use of and Perspectives on Mood-Tracking Apps: Interview Study. JMIR Ment Heal. 2021;8(8):e29368.
- 17. Wasil AR, Palermo EH, Lorenzo-Luaces L, DeRubeis RJ. Is There an App for That? A Review of Popular Apps for Depression, Anxiety, and Well-Being. Cogn Behav Pract. 2022;29(4):883-901.
- 18. Ghavanini SA, Homayounvala E, Rezaeian A. Mood-tracking application as persuasive technology for reduction of occupational stress. Int J Mob Learn Organ. 2018;12(2):143.