You are on page 1of 40

DEVELOPMENT OF FOOD GIVER MOBILE APPLICATIONS

BY USING ANDROID STUDIO

COURSE’S CODE BEE 40602

COURSE’S NAME FINAL YEAR PROJECT 1

FACULTY OF ELECTRIC AND ELECTRONIC


FACULTY
ENGINEERING

MUHAMAD ISSHAD DANIAL BIN MOHD HARITH


NAME & MATRIC NO.
DE170134 (BEJ)

PROF. MADYA DR SITI ZARINA BINTI MOHD


LECTURER NAME
MUJI (JEC)

DATE OF SUBMISSION 29 / 06 / 2020

1
CONTENTS

CHAPTER TITLE PAGE

CONTENTS i
LIST OF FIGURES iii

CHAPTER 1 INTRODUCTION
1.1 Background of Project 1
1.2 Problem Statement 3
1.3 Objective 3
1.4 Scope 4

CHAPTER 2 LITERATURE REVIEW


2.1 Introduction 5
2.2 Food Mobile Application 5
2.2.1 Food Waste Reduction Application 6
2.2.2 Food Waste Application (11th Hour) 7
2.2.3 NoFoodWasted: Food Waste Reduction
Application 7
2.2.4 Android App that Connect Farmers
Farmers to Retailer 8
2.2.5 Food Recipe Finder Mobile App 9
2.2.6 NutriTrack: Android Based Food
Recognition App 10
2.2.7 Developing Sarawak Traditional Food
Locator Mobile App 11
2.2.8 Mobile Food Ordering App Using
OS Platform 12
2.2.9 Vege Application! Using Mobile App
To promote Vegetarian Food 13
2.3 Firebase Realtime Database 14
2.3.1 JustIoT Based on Firebase Real-Time
Database 14
2
2.3.2 Using Firebase Cloud Messaging to
Control Mobile App 15
2.4 Literature Review Summary 16

CHAPTER 3 METHODOLOGY
3.1 Introduction 18
3.2 Project overview 18
3.3 Software Development Life Cycle (SDLC) 20
3.4 Software 21
3.4.1 Android Studio 21
3.4.2 Firebase Cloud 22
3.5 Food Giver Application 23

CHPATER 4 RESULT AND ANALYSIS


4.1Initial Result 24
4.1.1 Create New Account 25
4.1.2 Login Account 28
4.2 Expected Result 31
4.3 Conclusion 31

REFERENCE 32
APPENDIX A Gantt chart (FYP 1) 34

3
LIST OF FIGURES

FIGURE NO. TITLE PAGE


2.1 The Interface of “FoodReduction App” [6] 6
2.2 Overall System Architecture [9] 8
2.3 Agile Development Architecture 9
2.4 The interface of “Nutritrack” Application 10
2.5 System Development Cycle Using Agile [12] 11
2.6 The interface of “Pick the Food” Application [13] 12
2.7 The interface of “Vege” Application 13
2.8 The Flow Chart of Data Message [17] 15
3.1 FoodGiver App System Overview 19
3.2 Software Development Life Cycle (SDLC) 21
3.3 Food Donator Interface Design 24
3.4 Food Recipient Interface Design 25
4.1 Interface of “FoodGiver App” 26
4.2 Declaration of Create New Account Information 27
4.3 Create New Account Information Requirement 28
4.4 Register User in Firebase 28
4.5 Firebase Authentication 29
4.6 Declaration of Login Account Information 30
4.7 Login Account Information Requirement 31
4.8 User Authentication 31
4.9 Forgot Password Configuration 32

4
CHAPTER 1

INTRODUCTION

1.1 BACKGROUND OF PROJECT

Food waste or food loss is a food that has been prepared to be eaten but end up not
eaten. The causes of this food waste occur at many different stages such as production,
processing, retail, and consumption. Wasting food become a significant issue around the world
where a survey has predicted that more than 58 percent of food that people have prepare and
produce for consumption is wasted every day [1]. Opposite to that, a lot of people that are
living in the third world country are dying because of not having a food which can lead to
malnutrition. It is also stated that in low-income countries that most of the food losses occurs
during the production of food while in developed countries the number of foods wasted at the
consumption stage per person per year is about 100 kilograms [2]. Therefore, lesser number of
foods should be wasted so that it can be distributed to the needy people. In this world of modern
age where people grow with the technology of artificial intelligence, people become more
dependant to the smartphone device. The use of the smartphone should be fully utilized
especially in reducing the number of food waste or loss.

The smartphone or mobile phone applications can be seen in a very wide use,
especially in a recent year. As the device itself is easy to carry, a lot of different type of
application of different purpose can be installed inside the device. This opportunity should be
taken as the development of the smartphone application can be used to help in reducing the
number of foods wasted around the world. One of the methods that has been use nowadays in
developing the mobile applications is by using the Android Studio Software that are developed
by the Google company itself. This software offers some feature that can enhance the
productivity when building an Android apps such as providing a flexible Gradle-based build
system and providing a fast and feature-rich emulator [2]. In order to have a full access of
Android’s features, the development of apps using Android Studio has become a compulsory
because it is provided by Google as a full-fledged development environment for Android
development, debugging, testing, and packaging [3].

5
The production of application on smartphone has been able to help a lot of people to
make their daily activities easier and neater. Furthermore, it can be seen that a lot application
that have been developed today are able to provide a good service towards user and most of
the user does not have any problem in using smartphone application as it is simpler. A lot of
smartphone application that are provided today can give various type of service such as
communication, education, entertainment, food and even transportation service. It can be said
that the development of the smartphone application has been able to provide a lot of services
that can reduce the burden of people in their daily basis.

6
1.2 PROBLEM STATEMENT

The food waste in Malaysia has reach a critical level where a data provided by Solid
Waste Management shows that 55 percent of solid waste that are disposed at the landfills are
comprise with food [4]. The common causes that can lead to the waste of food are
overproduction, overbuying and spoilage of food. This worrisome problem has caused food
waste specialist to urge the government due to reports that Malaysians produce almost 16,000
tonnes of waste food each day [5]. Food waste can be controlled by urging all institutions or
business that are involved in producing and selling food to becomes more aware with this
arising problem that can lead to the increase of greenhouse gas emissions. Citizens of Malaysia
also need to be more aware of this food waste problems because being responsible can help to
reduce this arising problem.

One of the solutions that will be proposed in this paper is to develop a smartphone
application that can help people to donate or give extra food to the less fortunate people who
are in need for food so that the number of food wasted can be reduced. Furthermore, the
development of this application can help to provide food to less capable people such as
homeless or students. This application can help to benefit both user and receiver where more
waste food can be saved and can be given to the less fortunate people. Thus, the amount of
waste food can be reduced and can help to produce greener environment.

1.3 OBJECTIVE

 To develop a food giver and recipient application for Android by using Android Studio

software.

 To create an application that are connected to the Firebase database where it can store

all data and information.

 To analyse the effectiveness of the food giver application in terms of user satisfaction

and system performance.

7
1.4 PROJECT SCOPE

The development of the food waste applications will be focusing at Universiti Tun
Hussein Onn Malaysia (UTHM) where the user will be among the student and staff of the
university itself. The development of the Food Giver mobile applications will involve more
than 10 users that will act as the food giver and food recipient. The Firebase Server will be link
to the Food Giver Application where all the data of the user and food will be stored. The
minimum Software Development Kit (SDK) for this mobile application that can support will
be Application Programming Interface (API) 21 which is the Android version of 5.0 (Lollipop).
The main software that will be used to develop the Food Giver application is Android Studio
software version 4.0 and this application will be only available at Android device.

8
CHAPTER 2

LITERATURE REVIEW

2.1 INTRODUCTION

This chapter provides an overview of previous research about food mobile applications. It
introduces the framework for the case study that comprises the focus of the research described
in this thesis. Most of the research paper that will be discussed in this chapter will be focusing
on mobile applications that are related to food and the software related to this project.
.

2.2 FOOD MOBILE APPLICATION

Software development for mobile applications in this project is a process that involves the use
of food related, mobile applications software, computer programming, application interface
design and the analysis related to the mobile application that show how a standard mobile apps
should be functioning that can give a satisfaction to Android mobile application user. The
process of software development involves doing research, prototyping, modification,
maintenance, or any other activities that can help in the development of the mobile apps. The
previous research used different method to develop the mobile application design. It will be
discussed further at this chapter, therefore the comparison between each research and its gap
could be determined to make an improvement to benefit others.

9
2.2.1 FOOD WASTE REDUCTION APPLICATION OF UNITED ARAB EMIRATES

The wide use of mobile phone user in these few recent years has led to the development
of the mobile application especially for the Android operating system that is one of the most
popular platforms for mobile phone. A research of food wastage reduction by using the mobile
application by Anzer et al., stated that the development of android application has become
more relevant as it reach a bigger range of audience since most people nowadays use android
phones and this medium or method can help in limiting the wastage of food [6]. The studies of
this mobile application development focus on how a restaurant that have leftover food can give
it to other user by providing the food description and the location of where the food can be pick
up by other user. The design of the application “FoodReduction App” interface consist of more
than one login for different user that is the user login and the restaurant login itself. Figure 2.1
shows the login and registration interface for restaurant and other than that, the application also
has other interface function such as login, logout, view the image of the food, description, and
add food to the cart which can help in providing user with more comfortable and easy use of
the mobile applications. The authentication and confidentiality of all user and restaurant login
where the information regarding the name, age and gender under a unique id will be generated
and stored into the firebase system.

Figure 2.1: The Interface of “FoodReduction App” [6].

10
2.2.2 FOOD WASTE APPLICATION OF SINGAPORE (11TH HOUR)

Tan Jun Yuan created the application named 11Th Hour which help to create a win-win
situation between food merchants and the consumer to fight against large food waste
productions. This application provides the left and unused foods at the half of their original
price before the restaurants are closed where it will promote last-minute food deals to save the
food from become wastage. After the creation of this application, there were almost 20000
downloads of this application [7].

2.2.3 NOFOODWASTED: FOOD WASTE REDUCTION MOBILE APPLICATION

August de Vocht developed an application to reduce the amount of food waste at the
supermarket so that people can be aware of the foods that will be expired very soon. The
applications also are able helps the users to upload their grocery items, which will expire soon
so that people who need food can buy them at a reduced price and use them. It helps to stop
the wastage of excessive foods. More than 20000 people have found this application useful,
and it has reduced the amount of food wastage in the Netherlands. The target for this food
waste reduction mobile application is to reduce waste by 50 percent in five years from the year
it starts developed that is 2015 [8].

11
2.2.4 ANDROID APP THAT CONNECT FARMERS TO RETAILERS AND FOOD
PROCESSING INDUSTRY

A study by Shriram et al., stated that the use of native language support to understand
the module in the development of mobile application so that the user of the application will be
able to fully utilize all features provided [9]. This research paper focus on creating a design
based on the client-server architecture where the main client is the Android device and the uses
of Firebase cloud as the server for the application development. The features that are provided
in the application is product details upload with real images function, shopping cart,
notifications, and product search option with different parameters. The Firebase SDKs for
Cloud Storage use the Google security for any file uploads to secure the real-time database
where the cloud will be functioning as the server-side code where it can support various triggers
and HTTP-requests. Figure 2.2 shows the internal modules of the application where it is
basically providing a user-friendly interface where user can access and find all information
with simple steps. The unique id of each user will be stored in the firebase as the basic
authentication for the user.

Figure 2.2: Overall System Architecture [9]

12
2.2.5 FOOD RECIPE FINDER MOBILE APPLICATIONS

Pangestu et al., has conducted a study which is developing a smartphone application


called “Recepiece” which has the function to store and search many food recipes based on the
materials owned by the smartphone user [10]. The development of the mobile applications by
using the IONIC framework where it can be used to developed hybrid mobile apps with
HTML5, CSS and AngularJS and can released on more than one platform or cross-platform.
Figure 2.3 shows the agile development architecture which is also being applied where
interactions and personnel are more important than processes and tools. The application design
interface by using the programming language of JavaScript with additional CSS and PHP
where it consists of four main features which is the write page, search page, timeline, and login.
The database structure for this mobile application is using MySQL where the database is built
on PhpMyAdmin applications that can be hosted online on a certain web host.

Figure 2.3: Agile Development Architecture

13
2.2.6 NUTRITRACK: ANDROID-BASED FOOD RECOGNITION APPLICATIONS

A research by Ocay et al., had created and developed an Android application that can
recognize food calorie which can be used as a health awareness device for the non-health
conscious individual [11]. The method that has been applied is Extreme Programming where
user stories were considered thoroughly during the project development, specifications, and
details. Which means that the development of this mobile applications focuses on a certain
condition where not all user can be relate to the function of this application. The features of the
application consist of dietary monitoring and nutrition assessment tool which can be helpful
for users that have goal setting in health. The feature to shows the allocated daily measurement
to calculate the Basal Metabolic Rate (BMR) is approach by using the Mifflin-St Jeor
computing method. Figure 2.4 shows the user interface for the mobile application. User can fill
in their detail so that the application can do a calculation on how many daily calorie need for
the user and the detail value of calorie in a certain food. The API applied in the mobile
application use a machine learning algorithm that can recognize the type of food from a
converted digital photo into a segmented region with possible output.

Figure 2.4: The interface of “Nutritrack” Application

14
2.2.7 DEVELOPING SARAWAK TRADITIONAL FOOD LOCATOR MOBILE
APPLICATIONS

The review and experience by Fauzi et al., for the development of Sarawak Traditional
Food Locator mobile applications that are able to guide tourist to locate unique food when
travelling to Sarawak [12]. The use of Unified Modeling Language (UML) which is a standard
modeling language that can enable developer to specify, visualize, construct and document
program for a software system which can make the overall system to be scalable, secure and
robust. Figure 2.5 shows the agile development system that used in this research. It can split
all functionalities into different parts and will build accordingly instead of releasing a big final
product at the end at once. The possible challenges for the mobile applications development
are listed in the paper as to prepare for the proper measurement to implement the applications
to the user itself.

Figure 2.5: System Development Cycle Using Agile [12]

15
2.2.8 MOBILE FOOD ORDERING APPLICATIONS USING OS PLATFORM

A research conducted by Michael Yosep Ricky (2014) to design and create an ordering
food application for Android operating system named “Pick The Food” which application can
gives restaurant list information with menus and able to provide feature to check new order,
check order history and the order status itself by using the Global Positioning System (GPS) in
mobile phone [13]. The study approach by using the waterfall model of System Development
Life Cycle (SDLC) which involve planning, system analysis, system design, development,
implementation, integration and testing, and operations and maintenance. The user experience
design by using Unified Modeling Language (UML) which consist of use case, class diagram
sequence diagram, activity diagram and database structure design. The database of this mobile
application that is MySQL database management system which can be relate between
applications developed in Android OS and website developed by using Java Server Page (JSP).

Figure 2.6: The interface of “Pick the Food” Application [13]

Figure 2.6 shows that the interface of the applications is made based on eight golden rules
which in consistency in designing the interface, able to provide universal usability that is user
friendly, able to provide information feedback, design final dialog, simple error handling,
reversal action allowance, internal locus of control, and able to reduce the information capacity
for short-term memory.

16
2.2.9 VEGE APPLICATION USING MOBILE APPLICATION TO PROMOTE
VEGETARIAN FOOD

A study by Andhika et al., stated that mobile technology has become a way for all
entrepreneurs to promote their own product directly to customers [14]. The development of the
mobile application is built by using Android Studio (IDE) as the virtual editor to test the “Vege”
application. The programming language use is Java programming language and XML language
(Extensible Markup Language). Figure 2.7 shows the interface design that is done into two
parts that is the front-end design where the interface view can be seen until the process of
buying vegetarian food can be seen and the back-end design, it manage vegetarian food
products by adding product categories to serve the shipping process. Dividing the work to
design the mobile application can make the user interface to become neater and it can create a
more user – friendly interface for the user. It is also stated that the contribution of sound
software architecture and user experience can be the key to a successful mobile application
development.

Figure 2.7: The interface of “Vege” Application

17
2.3 FIREBASE

The uses Firebase software are one of the most important things in the development of
mobile application as the cloud-hosted database or the server will act as the storage for all the
data information from the user. The data obtain from the user will be stores as JSON and will
be synchronized in real time to all the user that have internet connection. The Firebase that
build in the cross-platform apps such as Android or iOS will be sharing the one Realtime
Database instance to the user and they will be automatically receive all the updates with the
newest data [15].

2.3.1 JustIoT INTERNET OF THINGS BASED ON THE FIREBASE REAL-TIME


DATABASE

A study by Wu-Jeng Li et al., created a JustIoT a management web that are based on
the Angular front-end technology that are connected to the Firebase real-time database [16].
The modification in the Firebase database can trigger the Angular’s two-way data binding to
help achieve a Three-way data binding that can affect the implementation to the server-less
architecture. The uses of the Firebase cloud system that can give authentication and planning
database in terms of the user email and password which will make the system more secure. The
database of the JustIoT consist of users, companies, controller, data points, control rules, and
data records which will be stored into the Firebase database. The Internet of Things system call
JustIoT in this paper are created for educational purposes that can help other user to design the
IoT applications and the Firebase Cloud that are used has a function call Cloud Functions that
can allow users to write their programs in JavaScript programming language and will be place
in the Firebase cloud platform.

18
2.3.2 USING FIREBASE CLOUD MESSAGING TO CONTROL MOBILE
APPLICATIONS
A research by Mokar et al., stated that the Firebase cloud messaging technology can be
used to send data to a mobile applications which it can give a changes to the application itself
depending on the type of data sent [17]. The data that will be sent is set in the JSON format file
to extract the information received from the other application user through the mobile
application. The JSON data that received will be send from the developed Rest Client to the
set mobile applications that have the same target id and thus when the developer send a data
message, the Firebase cloud will receive the data message and it will be redirect the data
message as notification to the mobile application. Figure 2.8 shows the process of how a Data
Message is being sent from Firebase App to the user mobile device. The data message will be
sent to Firebase cloud server and the Firebase cloud will send the data message to the mobile
device.

Figure 2.8: The Flow Chart of Data Message [17].

19
Table 2.1: Existing research on Android Application
Ref. Year Title System Function Cloud Type Apps Type
[6] A Food Wastage Restaurant user can upload Firebase Cloud Food-based
2018 Reduction Mobile food image, name, and
Application description.
User can see list of meals
available and pick any
meal they want

[7] Food Waste Food waste that are left Firebase Food-based
2016 Application of and unused will be sell half Cloud,
Singapore (11th of its price to consumer Android
Hour) that are interested. Studio

[8] NoFoodWasted: Almost expired food will Firebase server Food-based


2016 Food Waste be upload by supermarket
Reduction Mobile and user. The food that
Application uploaded into the
application will be sold at
reduced price so that
people who need food can
buy them.

[9] Android App to Farmers can sell goods at Android SDK, Food-based
2018 Connect Farmers reasonable price and Firebase server
to Retailers and consumer can choose a
Food Processing wide variety of products,
Industry select the product as per
their requirement and to
apply price filters

[10] Food Recipe Function as an application MySQL Food-based


2018 Finder Mobile to store and search for
Applications recipes based on materials
Based on owned by the user.
Similarity of
Materials
[11] NutriTrack: The application lets the Firebase server Food-based
2017 Android-based user take the photo of the
Food Recognition food and show its
App for Nutrition nutritional contents.
Awareness

[12] Review and Can provide information Unified Food-based


2017 Experience on about traditional food Modeling
Developing eating places, able to Language,
Sarawak suggest local traditional Agile
cuisines and navigate user development
to destination of food approach

20
Traditional Food
Locator Mobile
Apps
[13] Mobile Food Application can give MySQL, Food-based
2014 Ordering restaurant list information Unified
Application Using with menus and able to Modeling
OS Platform provide feature to check Language
new order, check order
history and the order status
itself.

[14] Vege Application! Vegetarian food can be Firebase Food-based


2018 Using Mobile sent immediately after Cloud,
Application to ordering in the vegetarian Android
Promote application without the Studio
Vegetarian Food need to come to production
site to save the cost of
buyer.

[16] JustIoT Based on Management web page Firebase, Research


2018 the Firebase Real- based on Angular front-end Angular SPA,
Time Database technology that is Arduino
connected to the Firebase
real-time database.

[17] Using Firebase Firebase cloud messaging Firebase, Messaging


2019 Cloud Messaging technology can be used to JSON
to Control Mobile send data to a mobile
Applications application which it can
give a change to the
application itself
depending on the type of
data sent.

21
CHAPTER 3

METHODOLOGY

3.1 INTRODUCTION

In this chapter, the methodology of “Food Giver Mobile Applications” will be discussed. The
methodology is usually a guideline system for solving a problem, find a suitable project,
researching and study all the project information and selecting the proper method. In this
chapter the methods and alternatives that have been used from the beginning until the end of
the project will be discussed.

3.2 PROJECT OVERVIEW

The ‘FoodGiver App” will require all user to create an account the first time they open
the application. All the information that been given by the user will be stored into the Google
Firebase Cloud under the authentication section. If the user has already created an account,
they can redirect to the login page where there are required to fill in their email address and
password based on the data that has been stored in the Firebase Cloud. The user will be redirect
to the main page of the application where user can see a list of food that can be received and
the details of the food itself such as the food name, date created and the location of the pick-
up. If a user want to donate food, there are required to go to the donate food page where there
can fill up the details of the food that they want to give such as the picture of the food, name,
data food created and the location they want to put the food. Figure 3.1 shows the flow chart
on how the “FoodGiver App” will work from the perspective of a user.

22
Figure 3.1: FoodGiver App System Overview

23
3.3 SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC)

The software development life cycle (SDLC) is a type of approach that can be used in
the developing the “FoodGiver App” where it can help in producing a good-quality mobile
applications that can meet and exceed the user expectations. The basic stages that are usually
used in the software development life cycle are planning, analysis, design, construction, testing
and implementation. The process of planning the application involve on how to achieve and
what steps that can be used to get to the objective of the project. This phase focus on the scope
of the project where the outputs of this phase is the project plan, schedules, and procurement
requirement. Next, the analysis of the application involves the analysis on different application
that are available in the market that deliver the same type of purpose as the “FoodGiver App”
where all the needs and requirement of the user can be seen.

After that, the process of designing the application are one of the process where a user-
friendly interface should be considered to create a good-quality mobile application that can
fulfil all the user requirement base on the analysis obtained. A user-friendly application
interface should be able to provide a quick access and straightforward to the common features
and command. A clean interface design can also lead to a user-friendly interface as well-
organized application interface can help the user to easier locate different tools and options.
All the aspects given will be considered to help in the process of the application construction
where it involved the detailed creation of the mobile application by using the Android Studio
software. All the output obtained during this phase is the design interface that list the pattern
and function of all the button in the application. The flow of the application starting from the
user login page until user logout page and the direction of each button that user will click in
the application.

24
The testing phase in the Software Development Life Cycle (SDLC) is arguably one of
the important process when producing and designing a product or an application. The quality
of the application produce should be determined so that it can match the standard requirement
for a mobile application and the user requirement. The testing of the mobile application should
include performance testing, security testing, integration testing and unit testing. After all
testing have been done, the mobile application will be ready to be deploy into the market itself
where it can be used by all user that choose to download the application. The final phase which
is the operations and maintenance phase is the long-term phase where the developer must
monitor the application constantly to ensure that all the operation and flow the application are
in the proper order. All bugs and defects that are discovered should be fix immediately to make
sure user does not face any problems during using the application.

Planning

Operation &
Analysis
Maintenance

Design
Deployment

Construction
Testing

Figure 3.2: Software Development Life Cycle (SDLC)

25
3.4 SOFTWARE

The process of the development of the “FoodGiver App” are mainly focus by using software.
The software that will be use in this project are all verified and trusted to make sure all the key
security concepts are fulfilled that is confidentiality, integrity, and availability. The
confidentiality of the apps is preserving authorized restrictions on user information access and
disclosure. All the information and privacy of the user should be protected. The integrity of a
mobile application means that the application can guard against improper information
modification and ensuring authenticity of the information provided by the application. The
availability key concepts are ensuring that the mobile apps provided by developer are reliable
in accessing and use of information.

3.4.1 ANDROID STUDIO


Android Studio software is the official Integrated Development Environment (IDE) for
Google’s Android operating system application development. The software itself has a flexible
Gradle-based build system where Gradle is an advanced build toolkit that can automate and
manage the build process of the application development. It also allows the developer to define
their own flexible custom configurations to design and build the application. This software also
has a fast and feature rich emulator where developer can test their application directly in the
emulator provided or they can use their own device as the emulator for the application.
Moreover, the development of the application by using the Android Studio has a unified
environment where developer can develop mobile application for all version Android devices.
This means that developer can choose what version of Android that can support the application
that they are developing. Developer also can choose the programming language that they will
be using to develop the apps either by using Java or Kotlin programming language. The
Android Studio software also give code templates and GitHub integration that can help
developer to build common app features easily without having high understanding of the
programming language.

26
3.4.2 GOOGLE FIREBASE

Firebase is a platform under Google created to help in the development of mobile and
web application. This platform serves various type of service that can be applied into a mobile
application and one of the services provided is the authentication service. The Firebase
Authentication can authenticate users using only client-side code and it also support social
login providers such as Facebook and Google where user can login into the mobile application
by using the account that have created in Facebook or Google. Moreover, it includes a user
management where developer can enable user authentication with email and password that will
be stored into Firebase. After that, Firebase also provides a real-time database and back-end
service where developers can allow the applications data to be synchronized across all user and
stored in the Firebase cloud. The Firebase Cloud Messaging or know as Google Cloud
Messaging (GCM) is a cross-platform solution for all messages and notifications for Android,
iOS, and web applications. This feature enables the developer to notify the user application that
new email or data are available to be synchronized with their device where developer can send
notification to drive the user re-engagement and retention.

27
3.5 FOODGIVER APPLICATION

“Create new account page” or interface will act as the first page that a new user will be
seen. This page will require all user to fill in their personal information such as full name, email
address, password account and phone number for them to register to the application. All the
data that the user give will be stored directly into the Firebase authentication server which will
display user email address as identifiers, providers, date account created, date account signed
in, and the unique user UID. The apps developer that using the Firebase as their application
server also has the option to reset password, disable account and delete account of all the user
data in the Firebase. Login page will be the page or interface that can be seen by user that have
already create an account before. The user will be required to enter their email address and
password to complete the login process. If the data of email address and password match the
data that have already exist in the Firebase, the user login process will be completed.

The menu of the application that will be seen in the “FoodGiver Apps” is food available
list page, food giver page and user profile page. The food giver page will require a user that
wants to give or donate their food to put a name, food image, location, and date the food created
to create a post of donated food. Figure 3.3 shows the recipient page design where all the
information that user inserted in the food giver page will be displayed to other user in the food
available list page.

Figure 3.3: Food Donator Interface Design

28
Figure 3.4 shows the recipient page interface design where other user can see the food name,
food image, location to take the food, and the date the page created. One of the features that
will be add in the food available list page is the automatic delete post where all post that have
posted for more than 72 hours will be deleted by the system. This is because all the prepared
food that has been posted will be in expiry phase and become a wastage. The user profile page
or interface can only be accessed and seen by the user only because all user will have different
information in the user profile page. All user will be having the option to edit or change their
information such as password and user id.

Figure 3.4: Food Recipient Interface Design

29
CHAPTER 4

RESULT AND ANALYSIS

4.1 INITIAL RESULTS


This chapter explained about the process of development of “FoodGiver App”. The
purpose of the testing is to have a better understanding about the system functionality by
observing the result and analysis that were conclude from the testing. This early application
interface testing will be showing the effectiveness of “Create New Account” and “Login Page”
interface that are related to Firebase Authentication feature. The test that will be conducted is
to make sure all user information such as email id and password will be stored in the Firebase
database. The application to recall all the data that has been stored so that old user can login to
the application with the exact email address and password.

Figure 4.1: Interface of “FoodGiver App”

30
4.1.1 CREATE NEW ACCOUNT

The data information that all user will be required to fill to create a new account in this
application is their full name, email address, account password and phone number. All this
information will be stored in the Firebase Authentication by following the steps required by
the Android Studio software to connect the application to the Firebase Cloud.

Figure 4.2: Declaration of Create New Account Information

Figure 4.2 shows the Java programming language are used to declaring all instance in the
interface such as full name, email address, account password, phone number, register button,
login link, Firebase Authentication, and the progress bar. All these declarations of information
are based on the android id that has been written in the design interface phase of this application
and the instance are needed to be initialize. Certain requirement will be needed to make sure
all the information entered by user can be accepted into the Firebase Authentication. Figure 4.3
shows that the email address and the password are declared as string so that when the email
information and password information is empty, an error or warning will be shown to user that
“Email is Required” and “Password is Required”. Another requirement needed for the
password is that user will be needed to create a password more than 6 character and any
password less than 6 character will produce error to the user. The progress bar or loading bar
will be set to be seen when all the required information is fill in.

31
Figure 4.3: Create New Account Information Requirement

Figure 4.4: Register User in Firebase

The information of the user that has been filled in will be stored and register into the Firebase
authentication by connecting the application to the Firebase itself by using email address. To
use an authentication provider, the Firebase console for Firebase Authentication will be enabled
by going to the Sign-in Method page in the Firebase Authentication section to enable sign-in
by using email address, password and any other identity providers wanted in the application.
Figure 4.4 shows that if the user registration is successful, the text “User Created” will be
display and user will be redirect to new page that is the main activity. If the registration process
is failed, the error message from Figure 4.3 will be displayed and the progress bar visibility
will become gone or invisible back.

32
Figure 4.5: Firebase Authentication

Figure 4.5 shows the console of the Firebase Authentication where the user information that
will be displayed is email address as the identifiers, the providers will be email, date account
created, date last sign-in and the user unique identifier (UID). The button add user will enable
to directly create a new account in the application without going through the application by
only filling in the email address and password. Some of the settings that can be done in the
firebase console is by selecting either an account email address can create multiple accounts
by using the same email address or not and in this application, the creation of multiple account
by using the same email address is disabled.

33
4.1.2 LOGIN ACCOUNT

Login to existing account can be done by the user when they gain access to the
applications by identifying and authenticating their email address and password that they have
given in the previous create new account process. The application will recognise either the
account that the user is trying to log in are already existed or not by matching the data fill in
with the data stored in the Firebase Authentication data.

Figure 4.6: Declaration of Login Account Information

Figure 4.6 shows the Java programming language that are used to declaring all instance in the
interface such as email address, account password, login button, create new account text, forgot
password link, progress bar, and the firebase authentication. All these declarations of
information are based on the android id that has been written in the design interface phase of
this application and the instance are needed to be initialize such as the email declaration will
be recognise by the android id of “Email” that has been declared in the interface designing
process. This android id must be matching with the instance so that any error can be avoided
during the process of login account.

34
Figure 4.7: Login Account Information Requirement

Figure 4.7 shows that the login button is set as the “setOnClickListener” which means that it
will link the data that has been filled in by the user to the Firebase Cloud. User will be required
to fill in the email address and the password information and if the requirement is not fulfilled,
error will be shown to user. The password length that are set must be more than 6 characters
which will match the password that user have entered in the create new account page. After the
information have been filled and the login button is pressed, the progress bar will be set to be
visible which will show the loading progress whether the information is matched with the data
in the Firebase Authentication or not.

Figure 4.8: User Authentication

35
The information of the user that has been filled in will be check and match with the data in the
Firebase authentication by connecting the application to the Firebase itself by using email
address. Figure 4.8 shows that if the user registration is successful, the text “Logged in
Successfully” will be display and user will be redirect to new page that is the main activity. If
the registration process is failed, the error message from Figure 4.7 will be displayed and the
progress bar visibility will become gone or invisible back.

Figure 4.9: Forgot Password Configuration

The forgot password link is set in the login page and if a user forgot their password, they will
be able to reset their previous password by entering their email address. Figure 4.9 shows that
if a user clicks the forgot password link, a small window will be appeared which require user
to enter their email address to receive the reset link. The reset link of the application is provided
by the Firebase Authentication itself where an email will be sent to the user which will provide
a link for the user to reset their password. The link clicks by the user will redirect user to a new
browser page where user can fill in their new password and the password data in the Firebase
will be changed and the old password data will be discarded.

36
4.2 EXPECTED RESULT

The expected result from this project soon can be described as follow:

1) Food Donator Page


A food donation page can be created where user can fill in information such as food
name, food description, the image of food, location of food, and the date of food created.
This information will be compiled and will be posted into the food receiver page where
all information can be seen by all user of this application.

2) Food Recipient Page


The food recipient page will be created where user can scroll all the post that has been
created in the food donation page and they can read all the information that has been
provided. User can choose the food that they want to receive by clicking a button where
it will remove the post after a few durations of time that will be set in Android Studio
software.

4.2 CONCLUSION

Based on the project of development of “FoodGiver App” by using Android Studio software,
it can be seen that the development of this subject so far has been successful. User can register
their account at any time and the Firebase Authentication will be updated with their
information. The data that has been entered by user can be use in the login page where the
application will be checked whether the information matched with the information stored in
the Firebase Cloud or not. The java programming in the Android Studio can be used to set
various type of function that can be displayed and use by the user of the “Food Giver App”.
More development can be done especially in the main activity page for the use of different
user.

37
REFERENCE

[1] B. A, J.Buchli, C.Gobel and C.Muller, "Food Waste in the Swiss Food Service Industry
- Magnitude and Potential for Reduction," Waste Management, pp. 218-226, January
2015.

[2] "Android Developers," Android, 14 February 2020. [Online]. Available:


https://developer.android.com/studio/intro.

[3] L. A. Allison and M. M. Fuad, "Inter-App Communication between Android Apps


Developed in App-Invetor and Android Studio," IEEE, Winston-Salem, May 2016.

[4] Bernama, "TheStar," The Star, 15 October 2018. [Online]. Available:


https://www.thestar.com.my/news/nation/2018/10/15/malaysians-throwing-away-food-
at-alarming-rate/.

[5] N. A. Aris, "freemalaysiatoday," FMT, 30 January 2019. [Online]. Available:


https://www.freemalaysiatoday.com/category/nation/2019/01/30/focus-on-reducing-
food-waste-putrajaya-told/.

[6] A.Anzer, H.A.Tabaza, W.Ahmed and H.Hajjdiab, "A Food Wastage Reduction Mobile
Application," International Conference on Future Internet of Things and Cloud
Workshops, vol. VI, pp. 152 - 157, 2018.

[7] W. K. Hoh, "The Straits Times," Singapore Press Holdings, 11 December 2016. [Online].
Available: https://www.straitstimes.com/singapore/it-changed-my-life-11th-hour-may-
just-clinch-the-deal. [Accessed 15 May 2020].

[8] M.V.Luyk, "The Interest of Limburg," Mediahuis NV, 7 September 2016. [Online].
Available: http://www.nofoodwasted.com/app-tegen-voedselverspilling/. [Accessed
2020 May 10].

[9] P.Shriram and S.Mhamane, "Android App to Connect Farmers to Retailers and,"
Proceedings of the International Conference on Inventive Computation Technologies, pp.
284 - 287, 2018.

[10] G.Pangestu, A.A.Supianto and F.Utaminingrum, "Food Recipe Finder Mobile


Applications," IEEE, pp. 156 - 161, 2018.

[11] A.B.Ocay, J.M.Fernandez and T.D.Palaoag, "NutriTrack: Android-based Food


Recognition App for Nutrition Awareness," IEEE International Conference on
COmputer and Communications, vol. III, pp. 2099 - 2104, 2017.

[12] H.A.Fauzi, C.L.Tang, D.N.F.A.Iskandar and S.N.Junaini, "Review and Experience on


Developing Sarawak Traditional food Locator Mobile Apps," IEEE International
Conference on Control System, Computing and Engineering, vol. 7th, pp. 269 - 272,
2017.

38
[13] M.Y.Ricky, "Mobile Food Ordering Application using Android OS Platform," EPJ Web
of Conferences, pp. 1 - 7, 2014.

[14] Andhika and O.Anton, "Vege Application! Using Mobile Application to Promote
Vegetarian Food," in 2018 International Conference on Applied Engineering (ICAE),
Indonesia, October 2018.

[15] G. Developers, "Firebase," Google, 2020 April 8. [Online]. Available:


https://firebase.google.com/docs/database. [Accessed 2020 May 20].

[16] W.J.Li, C.Yen, Y.S.Lin, S.C.Tung and S.M.Huang, "JustIoT Internet of Things based on
the Firebase real-time database," in IEEE International Conference on Smart
Manufacturing, Industrial & Logistics Engineering (SMILE), 2018.

[17] M.M.Abdalla, S.O.Fageeri and S.E.Fattoh, "Using Firebase Cloud Messaging to


Control," in International Conference on Computer, Control, Electrical and Electronics
Engineering (ICCCEEE19), Sudan, 2019.

39
APPENDIX A

GANTT CHART (FYP 1)

Activities 14 Weeks (1 semester)


1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 Preparation of Project Proposal
2 Finding Related Work
3 Proposal Submission to Supervisor
4 Search information about food apps
5 Apps interface design
6 Apps Simulation and implementation
7 Writing PSM I Report
8 Seminar I Paper Submission to
Supervisor
9 PSM I Presentation
10 PSM I Report Submission

40

You might also like