iNutritionApp: Mobile Application for Nutrition Monitoring using FatSecret API

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. Technology acceptance model with three parts were conducted with 30 respondents by evaluating the developed mobile application through questionnaires. Results of the testing showed that perceived of usefulness (PU) part achieved highest mean score compared to perceived ease of use (PEOU) that include 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.


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). 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.

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 acceptance of developed application, technology acceptance model (TAM) is carried out. TAM is divided into two perspective that include Perceived Usefulness (PU) and Perceived Ease of Use (PEOU). Survey questionnaire with 12 questions is developed and divided into three parts, where the first part to assess the perceived usefulness (PU) of the mobile application, while second and third part are user interface design and navigation for assessing the PEOU. TAM is done mainly for evaluating the technology acceptance among 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.

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 has 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.
(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.
(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.

RESULTS AND DISCUSSION
This section discusses results obtained from TAM. 30 participants with different background were involved in testing iNutritionApp. Survey questionnaire with 12 questions is divided into three parts which are related to usefulness (PU), user interface design, and navigation (PEOU). 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 shows the mean score obtained for each criteria tested. First part of testing is regarding usefulness which scored highest among other parts within the questionnaire which obtained 4.2-4.3 mean scores with 4.27 total mean for this part. Second part of the testing involved user interface design that shows the highest mean score obtained related to readability and understandability of text presented in mobile application 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. Third part of the questionnaire listed criteria related to navigation of developed mobile application. Result from the survey showed that the respondents' acceptance 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 TAM shows the mobile application is useful for user which achieved highest mean score compared to user interface design and navigation parts. This shows 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 PEOU that include 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