**iNutritionApp: Mobile Application for Nutrition Monitoring using**

**FatSecret API**

\*\*Double blind review, please do not include authors information in this version \*\*

Received Date: \*date

Accepted Date: \*date

Published Date: \*date

**HIGHLIGHTS**

  - Current trends of using mobile application are growing exponentially that leads to availability of various types of mobile application in software store.

  - Integration with FatSecret API allows mobile application to be more resourceful in terms of providing nutrition and calory information to user.

  - iNutritionApp is proven to be useful among 30 respondents from User Acceptance Testing conducted, which received highest mean score compared to user interface design and navigation.

ABSTRACT

*Mobile application is a software designed to run on smartphones, tablet computers, and other mobile devices. The growing millions of users who are using mobile applications have contributed to an increase in the development of the mobile applications for enterprises, education, the social network and healthcare. Widely used healthcare application nowadays includes general health and wellness, tele-medicine, personal coaching and consultation, medical record tracking, custom reminders and various health management apps. This paper presents a mobile application related to general health and wellness named as iNutritionApp for providing nutrient information, tracking nutrition and calorie intakes with the integration of FatSecret API. The API provides nutritional information based on type of food provided by user. The application was intended to overcome manual calorie intake calculations and assists diet plan. Development methodology of this mobile application utilizes three phases that are system requirements, system design and development, as well as testing. User acceptance testing with three parts were conducted with 30 respondents by evaluating the developed mobile application through questionnaires. Results of the testing showed that usefulness part achieved highest mean score compared to user interface design and navigation parts. Therefore, features and functionality offered by the iNutritionApp is proven to be useful for user in tracking calorie intakes and provide access to nutritional information.*

*Keywords: Mobile Application, Food Nutrition, Calory Intake, FatSecret API, User Acceptance Testing*

# INTRODUCTION

Throughout the new age of software and networking technologies, mobile phones or tablets have become highly pervasive in recent years. This is because people are becoming familiar to the machine and device’s software to find information, play games, communicate with their friends through social media and so on. Other than that, it can help people to store important data like files, photos and have better communication and establish new connection with people in every part of the world. The availability of various mobile application in software stores have made the mobile phones becoming more interactive.

Mobile applications run on a small handheld mobile device that is moveable, easy to use and accessible from anywhere and anytime. It is a software application designed primarily for the use on lightweight, portable computer devices such as smartphones and tablets rather than desktops or laptops and usually helps users by connecting them to internet services. Moreover, it is becoming increasingly important and can be used for different purposes (Alqahtani & Mohammad, 2015). There is positive global effect of mobile applications. Usage of mobile application in developed countries are getting better and leads to a modern form of IT infrastructure.

Mobile health (mHealth) defined by WHO as medical and public health practice supported by mobile devices, such as mobile phones, patient monitoring devices, personal digital assistants (PDAs), and other wireless devices (WHO, 2011). Various type of mobile health related application offered in software stores nowadays. These applications can be categorized into general health and wellness, tele-medicine, personal coaching and consultation, medical record tracking, custom reminders and various health management apps. For example, (Sethia et al., 2019) developed mobile application for managing patients record with NFC-enabled mobile devices. Various mobile health related applications developed such as diabetes management, weight management, smoking cessation and cardiovascular-related diseases management (Lohnari et al., 2016).

Table 1: Comparison of features and capabilities provided by different API.

<table>
<thead>
<tr class="header">
<th><p>API</p>
<p>Feature and</p>
<p>Capability</p></th>
<th><p>USDA Food Composition Database API</p>
<p>(USDA, 2020)</p></th>
<th><p>Edamam Food Database API</p>
<p>(EDAMAM, 2020)</p></th>
<th><p>FatSecret Platform</p>
<p>REST API</p>
<p>(FatSecret, 2020)</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Food database</td>
<td><em>/</em></td>
<td><em>/</em></td>
<td><em>/</em></td>
</tr>
<tr class="even">
<td>Nutritional database</td>
<td><em>/</em></td>
<td><em>/</em></td>
<td><em>/</em></td>
</tr>
<tr class="odd">
<td>Exercise diaries</td>
<td></td>
<td></td>
<td><em>/</em></td>
</tr>
<tr class="even">
<td>Diet program</td>
<td></td>
<td></td>
<td><em>/</em></td>
</tr>
<tr class="odd">
<td>Meal builder</td>
<td></td>
<td><em>/</em></td>
<td><em>/</em></td>
</tr>
<tr class="even">
<td>Recipe search</td>
<td></td>
<td><em>/</em></td>
<td></td>
</tr>
<tr class="odd">
<td>Search</td>
<td></td>
<td><em>/</em></td>
<td><em>/</em></td>
</tr>
</tbody>
</table>

Application Programming Interface (API) is a software medium that allow interaction of application to access predefined, data source, functions, objects and URI (Stylos et al., 2009). There are various API related to food and nutrition information available that can be used in mHealth application development. USDA National Nutrient Database API is the main source of food composition data in the United States. It provides a basis for most food composition repositories in both public and private sectors (USDA, 2015). The API offers descriptive nutrient figures for products and chosen ingredients, incorporates evidence for identified additional components to the database, and validates nutrient evidence compiling variables and algorithms (Haytowitz & Pehrsson, 2018). The FatSecret API is one of the most common and trusted food, nutrition and diet-related sources. The API capable of providing nutrition information such as calories, fats, carbohydrates and proteins (Javadi et al., 2020). It offers access to hundreds of extensive nutritional data through REST and JavaScript (Hariadi et al., 2016). The Edamam Food Database API offers resources for discovering quality and nutritional information for processed products, packaged food and restaurant meals. It allows searching and listing ingredients, calories, diet and allergy preferences (Chițaniuc et al., 2018). Table 1 show the comparison of features dan data source provided by each API. The table shows FatSecret API provide more sources in terms of exercise diaries, diet program and meal builder compared to the other two APIs.

Monitoring the consumption of nutrients is an essential task and is part of healthy dietary practice (Holst et al., 2018). Nutrition is a vital component of health and development for each person. Better nutrition is associated to healthier immune systems and lower incidence of non-communicable diseases such as diabetes and cardiovascular disease and lifespan. Complete nutrition includes the intake and consumption of vitamins, nutrients, essential protein amino acids and essential fatty acids from fat-containing products, as well as dietary calories in the form of carbohydrates, proteins and fats. In other words, by monitoring their food in the context of a short-term or long-term health goal (Ridder et al., 2017).

This paper presents development of mobile-based application for personal monitoring of nutrition and calorie intake. Besides, the application also allows user to record meal plan on daily basis. The development involves integration of FatSecret API as a data source for nutrition and calory information, SQLite and Firebase for data storage and retrieval. The use of mobile application as a medium for user tracking and monitoring nutrition and calory intake may contribute to healthy eating habits. The following sections of this paper are organized as follows, methodology, results and discussion and conclusion.

# METHODOLOGY

The development methodology of iNutritionApp involves three phases and can be depicted in Figure 1. Phases include system requirements, system design and development, and testing. Each phase has activities planned to achieve objective of the project. Generally, the first phase is intended to gather all aspects required for the development. Second phase involves planning activities and establishing conceptual ideas for the development and the third phase to evaluate the development outcomes.

![](60d495c4776a8_media/media/image1.png)

Figure 1: Phases involved in iNutritionApp development.

## System Requirement Identification

First phase of the methodology begins with system requirement identification. In this phase, feasibility study is carried out to determine the achievability of the project by reviewing articles, journals and report of the related work. This step is crucial to gain essential ideas, issues and problems of related works and reviewing approaches and solutions of previous work. Every requirement for developing iNutritionApp are identified and analysed. Various related API that provides food nutritional information are reviewed to determine range of information provided which involve USDA Food Composition Database, Edamam Food API and FatSecret API.

## System Design and Development

The second phase involves two main activities which are design and development. This phase plays important role in realizing the expected development outcome of this applied research. Design activity include preparing sketches of user interfaces and entity relationship (ER) diagram for database. User interfaces design used to demonstrate the flows of application. Database design include the essential attributes such as nutrition, calory intake and user’s information. In this activity, diagrams are drawn using draw.io web-based application. The deliverable of this activity are user interfaces and ER diagram.

Development activity involve transforming designs to working and functional mobile application. Android Studio is the main integrated development environment used for the development with Java and XML programming languages. ER diagram designed are transformed into SQLlite for application’s localized data storage and Firebase cloud database for online data storage. Online data storage involves tables for storing users’ information, authentication, and diet plans. FatSecrect API is integrated with iNutritionApp and is the main source of data related to calories and nutritional information.

## Testing

Last phase consists of testing activities on developed mobile application. The first activity in this phase begins with testing the correctness of BMI and BMR calculations made by the mobile application. This also involve testing the data retrieval from the FatSecret API on the calorie and nutrition information. Second activity is purposedly to test the effectiveness of developed application, user acceptance testing (UAT) is carried out. Survey questionnaire with 12 questions which divided into three parts is developed. First part was comprised of questions related to user interface design and followed by usefulness, ease of use and usability, while the last part focusing on the navigation and usability. UAT is done mainly for evaluating the effectiveness of application when delivered to end users and may provide users’ feedback to allow improvements in future work. 30 respondents are randomly picked to download and given a task to explore and use the mobile application developed. The questionnaire survey is given once the respondents are done with the task given. Finally, once all respondents have provided the feedback, all data are retrieved and analysed. The analysis of results from the survey are documented.

![](60d495c4776a8_media/media/image2.png)

Figure 2: iNutritionApp Framework.

## Framework of iNutritionApp

The iNutritionApp framework encompasses of FatSecret API, SQLite and Firebase which can be depicted in Figure 2. User is required to authenticate by providing email and password to use the application. The authentication information stored on Firebase are compared to decide whether to allow user to access the application or not. Firebase is also used to store meal plan and details regarding body analysis. FatSecret API serves as a main data source for calorie and nutrition information. The application is required to provide access key to retrieve data. Localized data, for example, provided by user, body analysis information such as BMI and BMR, meal’s nutrition and calories queried are stored in SQLite. This will allow quick access to the data instead of accessing the API every time it is needed.

## Mobile Application Interfaces

In this section, various interfaces that represent main functions of the mobile application developed is discussed. Figure 3.a. illustrates an interface for authentication before allowing user to access menu in welcoming activity interface in Figure 3.b. New user have to register to use the application and any registered user who forgot the password can reset by tapping on the “Forgot your password?” button. The main interface of this mobile application display four menus that include Body Analysis, Food Search, Meal Plan and Sign out. These menus will redirect user to functions developed for this application.

| ![](60d495c4776a8_media/media/image3.png)                 | ![](60d495c4776a8_media/media/image4.png) |
| --------------------------------------------------------- | ----------------------------------------- |
| (a)                                                       | (b)                                       |
| Figure 3: Authentication and welcoming activity interface |                                           |

Body analysis menu will redirect user to Figure 4.a. to fill up details including age, gender, weight, height and weekly physical activities. This will allow application to calculate and display BMR, BMI values and its category as in Figure 4.b. BMR values calculated are displayed in kilocalories or kcal unit and providing the amount of calories a user should take on daily basis. Food Search menu will redirect user to enter specific type of food, refer Figure 4.c. The interface is integrated with the FatSecret API that will allow user to query nutrition and calorie information based on given food type.

| ![](60d495c4776a8_media/media/image5.png) | ![](60d495c4776a8_media/media/image6.png) | ![](60d495c4776a8_media/media/image7.png) |
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| (a)                                       | (b)                                       | (c)                                       |
| Figure 4: Body analysis interface         |                                           |                                           |

Meal Plan features an interface for user to key in their food intake for every mealtime on daily basis. Mealtime includes breakfast, lunch, snack, and dinner which are represented by buttons (Figure 6.a). For example, if user tap on a ‘Breakfast’ button, the application will be redirected to UI as in Figure 6.b. This will allow user to set meal plan and reminder of respective mealtime. To add specific type of food, user need to tap on ‘Find and Log Food’ button and UI in Figure 6.c. This interface displays list of food and allows user to add or remove specific food and the calorie information retrieved from FatSecret API.

| ![](60d495c4776a8_media/media/image8.png) | ![](60d495c4776a8_media/media/image9.png) | ![](60d495c4776a8_media/media/image10.png) |
| ----------------------------------------- | ----------------------------------------- | ------------------------------------------ |
| (a)                                       | (b)                                       | (c)                                        |
| Figure 6: Meal plan                       |                                           |                                            |

# RESULTS AND DISCUSSION

This section discusses results obtained from UAT. 30 participants with different background were involved in testing iNutritionApp. Survey questionnaire with 12 questions is divided into three parts which are related to user interface design, usefulness and navigation. Respondents were given with five different rank criteria ranged between 1 to 5. Where 1 (strongly disagree), 2 (Disagree), 3 (Neutral), 4 (Agree), and 5 (Strongly agree).

**Table 1:** Mean score from user acceptance testing (UAT).

| **Descriptions**                                                      | **Mean Score** |
| --------------------------------------------------------------------- | -------------- |
| ***User interface design***                                           |                |
| Interfaces of the application is clear to understand and interactive. | 4.1            |
| Backgrounds colours and images do not cause disturbance to the user.  | 4.1            |
| Text is readable and understandable.                                  | 4.2            |
| Background colour is suitable for this application.                   | 4.1            |
| Background of the application is consistent.                          | 4              |
| **Total mean**                                                        | **4.1**        |
| ***Usefulness***                                                      |                |
| Easy to calculate my BMI and BMR.                                     | 4.3            |
| Users can learn how to use this application in a short time.          | 4.2            |
| Users think this application very helpful.                            | 4.3            |
| **Total mean**                                                        | **4.27**       |
| ***Navigation***                                                      |                |
| Application is easy to access from one page to another                | 4.2            |
| Button and UI component provided easy to understand and workable      | 4.2            |
| Users satisfy with the functionality and ease of use.                 | 4.1            |
| The application has every function that user expected to have.        | 4.2            |
| **Total mean**                                                        | **4.18**       |
| **Total mean for all parts**                                          | **4.17**       |

Table 1 shows the mean score obtained for each criteria tested. First part of testing regarding user interface design shows that the highest mean score obtained is related to readability and understandability of text presented with 4.2 mean score. Score in terms of the consistency of background colour or image is the lowest due to inconsistent use of colours and images within the application. Criteria listed under usefulness part scored highest among other parts within the questionnaire which obtained 4.2-4.3 mean scores with 4.27 total mean for this part. Third part of the questionnaire listed criteria related to navigation of developed mobile application. Result from the survey showed that the respondents’ satisfaction towards the functionality and ease of use scored lowest compared to the other three criteria. Overall mean obtained from three parts shows that iNutritionApp received 4.17 mean score.

# CONCLUSION

This paper has presented a mobile application named as iNutritionApp with an integration with FatSecret API. The application helps user in managing daily calorie intake by providing nutrition of foods from their meal plan. It also allows user to perform body analysis to get the current state of physical health conditions thru the calculation of BMI and BMR. Results from UAT shows the mobile application is useful for user which achieved highest mean score, compared to user interface design and navigation parts. This is proven that the developed application gives valuable insight to users and met its objective in tracking calorie intakes and provide access to nutritional information.

Future works will be directed towards improving the aspects of user interface design and navigation. The inconsistency representation of the user interfaces should reuse the common template with clear section stating on which interface the user is currently accessing. Other considerations may include suitable use of color to represent the interface or allows user to choose theme colors based on their preference. Navigation aspects can be improved by including a guided approach in using functions and features offered within the application.

**REFERENCES**

Alqahtani, M., & Mohammad, H. (2015). Mobile applications’ impact on student performance and satisfaction. *Turkish Online Journal of Educational Technology*, *14*(4), 102–112.Chițaniuc, M., Miron, B., & Iftene, A. (2018). *FoodAR - An Augmented Reality Application used in Gastronomy*. *3*, 18–23.EDAMAM. (2020). *Food Database API*. https://developer.edamam.com/food-database-apiFatSecret. (2020). *FatSecret Platform API*. https://platform.fatsecret.com/api/Hariadi, R. R., Khotimah, W. N., & Wiyono, E. A. (2016). Design and implementation of food nutrition information system using SURF and FatSecret API. *ICAMIMIA 2015 - International Conference on Advanced Mechatronics, Intelligent Manufacture, and Industrial Automation, Proceeding - In Conjunction with Industrial Mechatronics and Automation Exhibition, IMAE*, 181–183. https://doi.org/10.1109/ICAMIMIA.2015.7508027Haytowitz, D. B., & Pehrsson, P. R. (2018). USDA’s National Food and Nutrient Analysis Program (NFNAP) produces high-quality data for USDA food composition databases: Two decades of collaboration. *Food Chemistry*, *238*, 134–138. https://doi.org/10.1016/j.foodchem.2016.11.082Holst, M., Ofei, K., Skadhauge, L., Rasmussen, H., & T, B. (2018). Monitoring of Nutrition Intake in Hospitalized Patients: Can We Rely on the Feasible Monitoring Systems? *Journal of Clinical Nutrition and Metabolism*, *January*.Javadi, B., Trieu, Q. L., Matawie, K. M., & Calheiros, R. N. (2020). Smart Food Scanner System Based on Mobile Edge Computing. *Proceedings - 2020 IEEE International Conference on Cloud Engineering, IC2E 2020*, 20–27. https://doi.org/10.1109/IC2E48712.2020.00009Lohnari, T., Patil, S., & Patil, S. (2016). Use of Mobile Applications in Healthcare : A Review. *International Journal of Engineering Research and General Science*, *4*(1), 38–42.Ridder, D. de, Kroese, F., Evers, C., Adriaanse, M., & Gillebaart, M. (2017). Healthy diet: Health impact, prevalence, correlates, and interventions. *Psychology and Health*, *32*(8), 907–941. https://doi.org/10.1080/08870446.2017.1316849Sethia, D., Gupta, D., & Saran, H. (2019). Smart health record management with secure NFC-enabled mobile devices. *Smart Health*, *13*, 100063. https://doi.org/10.1016/j.smhl.2018.11.001Stylos, J., Faulring, A., Yang, Z., & Myers, B. A. (2009). Improving API documentation using API usage information. *2009 IEEE Symposium on Visual Languages and Human-Centric Computing, VL/HCC 2009*, 119–126. https://doi.org/10.1109/VLHCC.2009.5295283USDA. (2015). Composite of Foods Raw, Processed, Prepared. *National Nutrient Database for Standard Reference*, 154.USDA. (2020). *Food Data Central*. U.S. Department of Agriculture. https://fdc.nal.usda.gov/WHO. (2011). *mHealth - New horizons for health through mobile technologies*. https://www.who.int/goe/publications/goe\_mhealth\_web.pdf
